![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GameState.h>
Inheritance diagram for AGameState:Public Attributes | |
| int32 | ElapsedTime |
Public Attributes inherited from AGameStateBase | |
| TSubclassOf< AGameModeBase > | GameModeClass |
| TObjectPtr< AGameModeBase > | AuthorityGameMode |
| TSubclassOf< ASpectatorPawn > | SpectatorClass |
| TArray< TObjectPtr< APlayerState > > | PlayerArray |
Protected Member Functions | |
| virtual ENGINE_API void | HandleMatchIsWaitingToStart () |
| virtual ENGINE_API void | HandleMatchHasStarted () |
| virtual ENGINE_API void | HandleMatchHasEnded () |
| virtual ENGINE_API void | HandleLeavingMap () |
Protected Member Functions inherited from AGameStateBase | |
| virtual ENGINE_API void | OnRep_GameModeClass () |
| virtual ENGINE_API void | OnRep_SpectatorClass () |
| virtual ENGINE_API void | OnRep_ReplicatedHasBegunPlay () |
| virtual ENGINE_API void | UpdateServerTimeSeconds () |
| virtual ENGINE_API void | OnRep_ReplicatedWorldTimeSecondsDouble () |
GameState is a subclass of GameStateBase that behaves like a multiplayer match-based game. It is tied to functionality in GameMode.
|
virtual |
Called periodically, overridden by subclasses
|
overridevirtual |
Returns how much time needs to be spent before a player can respawn
Reimplemented from AGameStateBase.
|
overridevirtual |
Returns the time that should be used as when a player started
Reimplemented from AGameStateBase.
|
overridevirtual |
Called by game mode to set the started play bool
Reimplemented from AGameStateBase.
|
protectedvirtual |
Called when the match transitions to LeavingMap
|
protectedvirtual |
Called when the map transitions to WaitingPostMatch
|
protectedvirtual |
Called when the state transitions to InProgress
|
protectedvirtual |
Called when the state transitions to WaitingToStart
|
overridevirtual |
Returns true if match is WaitingPostMatch or later
Reimplemented from AGameStateBase.
|
overridevirtual |
Returns true if the world has started match (called MatchStarted callbacks)
Reimplemented from AGameStateBase.
|
virtual |
Gives clients the chance to do something when time gets updates
|
virtual |
Match state has changed
|
overridevirtual |
Reimplemented from AGameStateBase.
|
overridevirtual |
Called when the GameClass property is set (at startup for the server, after the variable has been replicated on clients)
Reimplemented from AGameStateBase.
| int32 AGameState::ElapsedTime |
Elapsed game time since match has started.
|
protected |
What match state we are currently in
|
protected |
Previous map state, used to handle if multiple transitions happen per frame
|
protected |
Handle for efficient management of DefaultTimer timer