Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UGameplayStatics
Description
Returns the number of fully initialized local players, this will be 0 on dedicated servers. Indexes up to this can be used as PlayerIndex parameters for the following functions, and you are guaranteed to get a local player controller.
| Name | GetNumLocalPlayerControllers |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
| Include Path | #include "Kismet/GameplayStatics.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
UFUNCTION (BlueprintPure, Category="Game",
Meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
static int32 GetNumLocalPlayerControllers
(
const UObject * WorldContextObject
)