AGameMode::GetNumPlayers

Returns number of active human players, excluding spectators

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

AGameModeBase::GetNumPlayers()

AGameMode::GetNumPlayers()

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/GameMode.h

Include

#include "GameFramework/GameMode.h"

Source

/Engine/Source/Runtime/Engine/Private/GameMode.cpp

Syntax

virtual int32 GetNumPlayers()

Remarks

Returns number of active human players, excluding spectators