Navigation
API > API/Plugins > API/Plugins/ModularGameplay
PlayerStateComponent is an actor component made for APlayerState and receives PlayerState events.
| Name | UPlayerStateComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Public/Components/PlayerStateComponent.h |
| Include Path | #include "Components/PlayerStateComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UPlayerStateComponent : public UGameFrameworkComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UGameFrameworkComponent → UPlayerStateComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPlayerStateComponent
(
const FObjectInitializer& ObjectInitializer |
Components/PlayerStateComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CopyProperties
(
UPlayerStateComponent* TargetPlayerStateComponent |
Copy properties which need to be saved in inactive PlayerState | Components/PlayerStateComponent.h | |
T * GetPawn () |
PlayerState accessors, only valid if called during gameplay. | Components/PlayerStateComponent.h | |
T * GetPlayerState() |
Gets the player state that owns the component, this will always be valid during gameplay but can return null in the editor | Components/PlayerStateComponent.h | |
T * GetPlayerStateChecked() |
Components/PlayerStateComponent.h | ||
virtual void Reset () |
PlayerState events. | Components/PlayerStateComponent.h |