RealDocs

UAbilitySystemComponent::OnRep_OwningActor

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

Description

RepNotify called on clients when the owning or avatar actor reference replicates. Re-initializes the ASC's actor info so abilities can access the updated pawn.

Caveats & Gotchas

  • Both OwnerActor and AvatarActor use this same RepNotify — a single function handles both UPROPERTY replication callbacks.
  • Do not call this directly; it is invoked automatically by the replication system. Override it only if you need to react to owner/avatar actor changes on the client.

Signature

void OnRep_OwningActor()

Return Type

void

Example

Overriding to update a local cache when the avatar changes C++
void UMyAbilitySystemComponent::OnRep_OwningActor()
{
    Super::OnRep_OwningActor();
    // Refresh cached pawn reference after replication
    CachedPawn = Cast<AMyCharacter>(GetAvatarActor());
}

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.