Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Cached data associated with an Actor using an Ability. -Initialized from an AActor* in InitFromActor -Abilities use this to know what to actor upon. E.g., instead of being coupled to a specific actor class. -These are generally passed around as pointers to support polymorphism. -Projects can override UAbilitySystemGlobals::AllocAbilityActorInfo to override the default struct type that is created.
| Name | FGameplayAbilityActorInfo |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTypes.h |
| Include Path | #include "Abilities/GameplayAbilityTypes.h" |
Syntax
USTRUCT (BlueprintType )
struct FGameplayAbilityActorInfo
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGameplayAbilityActorInfo() |
Abilities/GameplayAbilityTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AbilitySystemComponent | TWeakObjectPtr< UAbilitySystemComponent > | Ability System component associated with the owner actor, shouldn't be null | Abilities/GameplayAbilityTypes.h |
|
| AffectedAnimInstanceTag | FName | The linked Anim Instance that this component will play montages in. | Abilities/GameplayAbilityTypes.h |
|
| AnimInstance | TWeakObjectPtr< UAnimInstance > | Anim instance of the avatar actor. Often null | Abilities/GameplayAbilityTypes.h |
|
| AvatarActor | TWeakObjectPtr< AActor > | The physical representation of the owner, used for targeting and animation. | Abilities/GameplayAbilityTypes.h |
|
| MovementComponent | TWeakObjectPtr< UMovementComponent > | Movement component of the avatar actor. Often null | Abilities/GameplayAbilityTypes.h |
|
| OwnerActor | TWeakObjectPtr< AActor > | The actor that owns the abilities, shouldn't be null | Abilities/GameplayAbilityTypes.h |
|
| PlayerController | TWeakObjectPtr< APlayerController > | PlayerController associated with the owning actor. This will often be null! | Abilities/GameplayAbilityTypes.h |
|
| SkeletalMeshComponent | TWeakObjectPtr< USkeletalMeshComponent > | Skeletal mesh of the avatar actor. Often null | Abilities/GameplayAbilityTypes.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ClearActorInfo() |
Clears out any actor info, both owner and avatar | Abilities/GameplayAbilityTypes.h | |
UAnimInstance * GetAnimInstance() |
Accessor to get the affected anim instance from the SkeletalMeshComponent | Abilities/GameplayAbilityTypes.h | |
virtual void InitFromActor
(
AActor* OwnerActor, |
Initializes the info from an owning actor. Will set both owner and avatar | Abilities/GameplayAbilityTypes.h | |
bool IsLocallyControlled () |
Returns true if this actor is locally controlled. | Abilities/GameplayAbilityTypes.h | |
bool IsLocallyControlledPlayer() |
Returns true if this actor has a PlayerController that is locally controlled. | Abilities/GameplayAbilityTypes.h | |
bool IsNetAuthority() |
Returns true if the owning actor has net authority | Abilities/GameplayAbilityTypes.h | |
virtual void SetAvatarActor
(
AActor* AvatarActor |
Sets a new avatar actor, keeps same owner and ability system component | Abilities/GameplayAbilityTypes.h |