Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/Abilities
References
| Module | GameplayAbilities |
| Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTypes.h |
| Include | #include "Abilities/GameplayAbilityTypes.h" |
Syntax
USTRUCT&40;BlueprintType&41;
struct FGameplayAbilityActorInfo
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TWeakObjectPtr< UAbilitySystemComponent > | AbilitySystemComponent | Ability System component associated with the owner actor, shouldn't be null | |
| FName | AffectedAnimInstanceTag | The linked Anim Instance that this component will play montages in. | |
| TWeakObjectPtr< UAnimInstance > | AnimInstance | Anim instance of the avatar actor. Often null | |
| TWeakObjectPtr< AActor > | AvatarActor | The physical representation of the owner, used for targeting and animation. | |
| TWeakObjectPtr< UMovementComponent > | MovementComponent | Movement component of the avatar actor. Often null | |
| TWeakObjectPtr< AActor > | OwnerActor | The actor that owns the abilities, shouldn't be null | |
| TWeakObjectPtr< APlayerController > | PlayerController | PlayerController associated with the owning actor. This will often be null! | |
| TWeakObjectPtr< USkeletalMeshComponent > | SkeletalMeshComponent | Skeletal mesh of the avatar actor. Often null |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Clears out any actor info, both owner and avatar | ||
| UAnimInstance * | Accessor to get the affected anim instance from the SkeletalMeshComponent | ||
| void | InitFromActor
(
AActor* OwnerActor, |
Initializes the info from an owning actor. Will set both owner and avatar | |
| bool | Returns true if this actor is locally controlled. | ||
| bool | Returns true if this actor has a PlayerController that is locally controlled. | ||
| bool | Returns true if the owning actor has net authority | ||
| void | SetAvatarActor
(
AActor* AvatarActor |
Sets a new avatar actor, keeps same owner and ability system component |