Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Kismet > UGameplayStatics
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
Include | #include "Kismet/GameplayStatics.h" |
Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
static APlayerController &42; CreatePlayer
&40;
const UObject &42; WorldContextObject,
int32 ControllerId,
bool bSpawnPlayerController
&41;
Remarks
Create a new local player for this game, for cases like local multiplayer. The created player controller if one is created.
Parameters
Name | Description |
---|---|
ControllerId | The ID of the physical controller that the should control the newly created player. A value of -1 specifies to use the next available ID |
bSpawnPlayerController | Whether a player controller should be spawned immediately for this player. If false a player controller will not be created automatically until transition to the next map. |