UAttributeSet::GetOwningActor
#include "AttributeSet.h"
Access: public
Specifiers: const
Description
Returns the actor that owns this AttributeSet, resolved by walking up to the AttributeSet's Outer.
Caveats & Gotchas
- • Relies on the AttributeSet's Outer being the owning actor, which is only true when it was created through the standard AbilitySystemComponent flow; manually constructed sets may return the wrong actor or null.
- • Returns a raw pointer with no null check baked in for callers; an AttributeSet that hasn't been fully initialized yet can return null.
Signature
AActor* GetOwningActor() const Return Type
AActor* Example
Log the owning actor's name C++
if (AActor* Owner = GetOwningActor())
{
UE_LOG(LogTemp, Log, TEXT("AttributeSet owned by %s"), *Owner->GetName());
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?