|
Nelaric Unreal Gameplay
Gameplay framework API
|
Base for gameplay components owned directly by a pawn. More...
#include <NelaricPawnComponent.h>
Public Member Functions | |
| GAMEPLAYRUNTIME_API APawn * | GetPawn () const |
| Gets the pawn that directly owns this component. | |
| template<typename T> | |
| T * | GetPawn () const |
| Gets the owning pawn as a specific pawn type. | |
| GAMEPLAYRUNTIME_API AController * | GetController () const |
| Gets the pawn's current controller on this machine. | |
| template<typename T> | |
| T * | GetController () const |
| Gets the current controller as a specific controller type. | |
| GAMEPLAYRUNTIME_API APlayerController * | GetPlayerController () const |
| Gets the current controller when it is a player controller. | |
| template<typename T> | |
| T * | GetPlayerController () const |
| Gets the player controller as a specific player controller. | |
| GAMEPLAYRUNTIME_API APlayerState * | GetPlayerState () const |
| Gets player state directly from the owning pawn. | |
| template<typename T> | |
| T * | GetPlayerState () const |
| Gets the pawn's player state as a specific player state type. | |
| GAMEPLAYRUNTIME_API bool | IsLocallyControlled () const |
| Queries the pawn's native local-control semantics. | |
| GAMEPLAYRUNTIME_API bool | IsPlayerControlled () const |
| Queries the pawn's native player-control semantics. | |
Base for gameplay components owned directly by a pawn.
The pawn owns the component and determines its lifetime. Queries read current local state without caching or replication. Call only on the game thread. Returned pointers are non-owning and do not keep objects alive; revalidate references retained across frames. Controller and player state availability is not guaranteed at BeginPlay. Tick and component replication are disabled by default.
|
inline |
Gets the current controller as a specific controller type.
Call on the game thread. Follows GetController() lifetime.
| T | Complete controller type derived from AController. |
| GAMEPLAYRUNTIME_API AController * UNelaricPawnComponent::GetController | ( | ) | const |
Gets the pawn's current controller on this machine.
Call on the game thread. Unpossessed pawns and remote client pawns may have no controller. The result is never cached.
|
inline |
Gets the owning pawn as a specific pawn type.
Call on the game thread. Uses the same lifetime as GetPawn().
| T | Complete pawn type derived from APawn. |
| GAMEPLAYRUNTIME_API APawn * UNelaricPawnComponent::GetPawn | ( | ) | const |
Gets the pawn that directly owns this component.
Call on the game thread. Does not traverse actor ownership.
|
inline |
Gets the player controller as a specific player controller.
Call on the game thread. Follows GetController() lifetime.
| T | Complete player controller type derived from APlayerController. |
| GAMEPLAYRUNTIME_API APlayerController * UNelaricPawnComponent::GetPlayerController | ( | ) | const |
Gets the current controller when it is a player controller.
Call on the game thread. Never searches by player index.
|
inline |
Gets the pawn's player state as a specific player state type.
Call on the game thread. Follows GetPlayerState() lifetime.
| T | Complete player state type derived from APlayerState. |
| GAMEPLAYRUNTIME_API APlayerState * UNelaricPawnComponent::GetPlayerState | ( | ) | const |
Gets player state directly from the owning pawn.
Call on the game thread. Does not require a local controller. State may be absent before replication arrives or after unpossession.
| GAMEPLAYRUNTIME_API bool UNelaricPawnComponent::IsLocallyControlled | ( | ) | const |
Queries the pawn's native local-control semantics.
Call on the game thread. Local control can include AI.
| GAMEPLAYRUNTIME_API bool UNelaricPawnComponent::IsPlayerControlled | ( | ) | const |
Queries the pawn's native player-control semantics.
Call on the game thread. Does not require a player controller to exist locally and does not imply local control or authority.