Navigation
API > API/Plugins > API/Plugins/ModularGameplay
GameStateComponent is an actor component made for AGameStateBase and receives GameState events.
| Name | UGameStateComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Public/Components/GameStateComponent.h |
| Include Path | #include "Components/GameStateComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UGameStateComponent : public UGameFrameworkComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UGameFrameworkComponent → UGameStateComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameStateComponent
(
const FObjectInitializer& ObjectInitializer |
Components/GameStateComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * GetGameMode () |
GameState accessors, only valid if called during gameplay. | Components/GameStateComponent.h | |
T * GetGameState() |
Gets the game state that owns the component, this will always be valid during gameplay but can return null in the editor | Components/GameStateComponent.h | |
T * GetGameStateChecked() |
Components/GameStateComponent.h | ||
virtual void HandleMatchHasEnded() |
Called when gameplay has fully ended | Components/GameStateComponent.h | |
virtual void HandleMatchHasStarted () |
GameState events. | Components/GameStateComponent.h |