AGameModeBase::PlayerControllerClass
#include "GameFramework/GameModeBase.h"
Access: public
Specifiers: UPROPERTYEditAnywhereNoClearBlueprintReadOnly
Description
The APlayerController subclass spawned for every player who joins. Set this in class defaults to give players access to custom input bindings and game-specific controller logic.
Caveats & Gotchas
- • Marked NoClear — cannot be set to None. A PlayerController is always required.
- • Changing this during play has no effect on existing players; it only applies to newly joining players. For seamless travel scenarios, also check SpawnPlayerController and GetPlayerControllerClassToSpawnForSeamlessTravel.
Signature
UPROPERTY(EditAnywhere, NoClear, BlueprintReadOnly, Category=Classes)
TSubclassOf<APlayerController> PlayerControllerClass Example
Read PlayerControllerClass from the active game mode
Blueprint
See Also
Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?