RealDocs

UAbilitySystemComponent::GetOwnerActor

function GameplayAbilities Since 4.15
#include "AbilitySystemComponent.h"
Access: public Specifiers: const

Description

Returns the logical owner actor stored in this component, which is typically a PlayerState rather than the Pawn when using the GAS split-ownership pattern.

Caveats & Gotchas

  • This returns OwnerActor — the GAS logical owner — not UActorComponent::GetOwner(). These can differ when the ASC lives on a PlayerState but the Pawn is the avatar.
  • Can return null during early construction before InitAbilityActorInfo has been called.

Signature

AActor* GetOwnerActor() const { return OwnerActor; }

Return Type

AActor*

Example

Get the owning PlayerState from an ability C++
APlayerState* PS = Cast<APlayerState>(
    AbilitySystemComponent->GetOwnerActor());
if (PS)
{
    // Access player-specific data
}

Version History

Introduced in: 4.15

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.