Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UGameplayStatics
Description
Returns the total number of available player controllers, including remote players when called on a server. Indexes up to this can be used as PlayerIndex parameters for the following functions.
| Name | GetNumPlayerControllers |
| 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 GetNumPlayerControllers
(
const UObject * WorldContextObject
)