AGameModeBase::SpawnPlayerController

Spawns the appropriate PlayerController for the given options; split out from [Login()](API\Runtime\Engine\GameFramework\AGameModeBase\Login) for easier overriding.

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 APlayerController * SpawnPlayerController
(
    ENetRole InRemoteRole,
    const FString & Options
)

Remarks

Spawns the appropriate PlayerController for the given options; split out from Login() for easier overriding. Override this to conditionally spawn specialized PlayerControllers, for instance.

Returns

PlayerController for the player, NULL if there is any reason this player shouldn't exist or due to some error

Parameters

Parameter

Description

RemoteRole

the role this controller will play remotely

Options

the options string from the new player's URL

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