Navigation
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework > AGameModeBase
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/GameModeBase.h |
Include | #include "GameFramework/GameModeBase.h" |
Source | /Engine/Source/Runtime/Engine/Private/GameModeBase.cpp |
virtual APlayerController &42; Login
&40;
UPlayer &42; NewPlayer,
ENetRole InRemoteRole,
const FString & Portal,
const FString & Options,
const FUniqueNetIdRepl & UniqueId,
FString & ErrorMessage
&41;
Remarks
Called to login new players by creating a player controller, overridable by the game
Sets up basic properties of the player (name, unique id, registers with backend, etc) and should not be used to do more complicated game logic. The player controller is not fully initialized within this function as far as networking is concerned. Save "game logic" for PostLogin which is called shortly afterward.
If login is successful, returns a new PlayerController to associate with this player. Login fails if ErrorMessage string is set. a new player controller for the logged in player, NULL if login failed for any reason
Parameters
Name | Description |
---|---|
NewPlayer | pointer to the UPlayer object that represents this player (either local or remote) |
RemoteRole | the remote role this controller has |
Portal | desired portal location specified by the client |
Options | game options passed in by the client at login |
UniqueId | platform specific unique identifier for the logging in player |
ErrorMessage | [out] error message, if any, why this login will be failing |