Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Kismet > API/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 |
UFUNCTION (BlueprintCallable, Category="Game",
Meta=(AutoCreateRefTerm="UserId", DisplayName="Create Local Player For Platform User", WorldContext="WorldContextObject", AdvancedDisplay="2", UnsafeDuringActorConstruction="true"))
static APlayerController * CreatePlayerFromPlatformUser
(
const UObject * WorldContextObject,
FPlatformUserId UserId,
bool bSpawnPlayerController
)
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 |
|---|---|
| UserId | The platform user id that should control the newly created player. A valude of PLATFRMUSERID_NONE 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. |