AGameModeBase::PreLogin

Accept or reject a player attempting to join the server.

Windows
MacOS
Linux

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

Syntax

virtual void PreLogin
(
    const FString & Options,
    const FString & Address,
    const FUniqueNetIdRepl & UniqueId,
    FString & ErrorMessage
)

Remarks

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

Parameters

Parameter

Description

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss