Navigation
API > API/Plugins > API/Plugins/ModularGameplay
PawnComponent is an actor component made for APawn and receives pawn events.
| Name | UPawnComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Public/Components/PawnComponent.h |
| Include Path | #include "Components/PawnComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UPawnComponent : public UGameFrameworkComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UGameFrameworkComponent → UPawnComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPawnComponent
(
const FObjectInitializer& ObjectInitializer |
Components/PawnComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * GetController() |
Gets the controller that owns the component, this will usually be null on clients | Components/PawnComponent.h | |
T * GetPawn() |
Gets the pawn that owns the component, this will always be valid during gameplay but can return null in the editor | Components/PawnComponent.h | |
T * GetPawnChecked() |
Components/PawnComponent.h | ||
T * GetPlayerState () |
Pawn accessors, only valid if called during gameplay. | Components/PawnComponent.h |