UAttributeSet::GetActorInfo
#include "AttributeSet.h"
Access: public
Specifiers: const
Description
Returns the FGameplayAbilityActorInfo cached on the owning AbilitySystemComponent, giving access to the avatar actor, movement component, and other ability-system actor context.
Caveats & Gotchas
- • Goes through GetOwningAbilitySystemComponent() internally, so it returns null if the AttributeSet isn't yet registered with an AbilitySystemComponent.
- • FGameplayAbilityActorInfo distinguishes 'owner actor' from 'avatar actor' (e.g. player state vs. possessed pawn); don't assume the actor here matches GetOwningActor().
Signature
FGameplayAbilityActorInfo* GetActorInfo() const Return Type
FGameplayAbilityActorInfo* Example
Read the avatar actor from actor info C++
if (const FGameplayAbilityActorInfo* Info = GetActorInfo())
{
if (AActor* Avatar = Info->AvatarActor.Get())
{
UE_LOG(LogTemp, Log, TEXT("Avatar: %s"), *Avatar->GetName());
}
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?