Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AGameModeBase
Description
Accept or reject a player attempting to join the server. Fails login if you set the ErrorMessage to a non-empty string. PreLogin is called before Login. Significant game time may pass before Login is called
| Name | PreLogin |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/GameModeBase.h |
| Include Path | #include "GameFramework/GameModeBase.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameModeBase.cpp |
virtual void PreLogin
(
const FString & Options,
const FString & Address,
const FUniqueNetIdRepl & UniqueId,
FString & ErrorMessage
)
Parameters
| Name | Remarks |
|---|---|
| Options | The URL options (e.g. name/spectator) the player has passed |
| Address | The network address of the player |
| UniqueId | The unique id the player has passed to the server |
| ErrorMessage | When set to a non-empty value, the player will be rejected using the error message set |