UGameInstance::CreateLocalPlayer

Syntax

ULocalPlayer * CreateLocalPlayer
(
    int32 ControllerId,
    FString & OutError,
    bool bSpawnPlayerController
)

Remarks

Adds a new player.

Returns

The player which was created.

Parameters

Parameter

Description

ControllerId

The controller ID the player should accept input from.

OutError

If no player is returned, OutError will contain a string describing the reason.

bSpawnPlayerController

True if a player controller should be spawned immediately for the new player.

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/GameInstance.h

Source

Runtime/Engine/Private/GameInstance.cpp