class

APlayerState

Module
Game
Header
#include "Game/APlayerState.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Constructors

SignatureNameDescription
APlayerState()APlayerState

Public functions

ReturnsNameDescription
AController*GetOwningControllerThe controller this state belongs to.
voidSetOwningController
voidInitPlayerBinds the actor to a session player.
int32_tGetPlayerId
boolIsLocalPlayer
std::stringGetPlayerName
int32_tGetScore
int32_tGetTeam
floatGetPing
boolIsReady
voidSetPlayerNameWrites.
boolAddScore
boolSetScore
boolSetTeam
EntityIDGetRecordEntityThe session record's ECS entity, INVALID_ENTITY when there is none yet.
T*FindRecordComponentA game's replicated per-player component on the record entity.
T*EnsureRecordComponent

Function details

APlayerState

C++
APlayerState()

GetOwningController

C++
AController* GetOwningController() const

The controller this state belongs to. A hot reload that respawns this actor restores the link by identity, which is how the controller finds its new state again.

SetOwningController

C++
void SetOwningController(AController* controller)

InitPlayer

C++
void InitPlayer(uint32_t playerId, bool isLocal)

Binds the actor to a session player. 0 with isLocal true follows this machine's player id, which the session assigns after the match began.

GetPlayerId

C++
int32_t GetPlayerId() const

IsLocalPlayer

C++
bool IsLocalPlayer() const

GetPlayerName

C++
std::string GetPlayerName() const

GetScore

C++
int32_t GetScore() const

GetTeam

C++
int32_t GetTeam() const

GetPing

C++
float GetPing() const

IsReady

C++
bool IsReady() const

SetPlayerName

C++
void SetPlayerName(const std::string& name)

Writes. The session record is the host's: on a client they change nothing there and return false. Without a session the actor's own copy changes.

AddScore

C++
bool AddScore(int32_t delta)

SetScore

C++
bool SetScore(int32_t score)

SetTeam

C++
bool SetTeam(int32_t team)

GetRecordEntity

C++
EntityID GetRecordEntity() const

The session record's ECS entity, INVALID_ENTITY when there is none yet.

FindRecordComponent

C++
template<typename T> T* FindRecordComponent() const

A game's replicated per-player component on the record entity. Find reads on every machine; Ensure adds it and is meaningful on the host only (a client's record is a replicated ghost, a component added there is not sent).

EnsureRecordComponent

C++
template<typename T> T* EnsureRecordComponent()
Generated from Game/APlayerState.h via game.json · Dec 5, 2026Version 1.1.0