AGameModeBase::SpectatorClass
#include "GameFramework/GameModeBase.h"
Access: public
Specifiers: UPROPERTYEditAnywhereNoClearBlueprintReadOnly
Description
The pawn class used when a PlayerController is in spectator mode (no possessed pawn). Customize this to control how free-look cameras or observer views behave.
Caveats & Gotchas
- • Marked NoClear — always requires a valid class. The default is ASpectatorPawn which uses a simple floating movement component.
- • This class is also used during the brief period between a player dying and respawning if the game mode spawns spectators between respawns.
Signature
UPROPERTY(EditAnywhere, NoClear, BlueprintReadOnly, Category=Classes)
TSubclassOf<ASpectatorPawn> SpectatorClass Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?