RealDocs

UAnimInstance::GetInstanceRelevantAssetPlayers

function Engine Since 4.11
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_APIconst

Description

Returns a read-only reference to the array of asset player tick records that are currently relevant — i.e., actively contributing to the output pose with non-zero blend weight. This is a filtered subset of GetInstanceAssetPlayers.

Caveats & Gotchas

  • Relevancy is determined during the animation update phase. Calling this before the update completes (e.g., during PreUpdateAnimation) may return stale data from the previous frame.
  • The 'relevant' filter uses the node relevancy system, which considers blend weights and state machine activity. A node with a very small but non-zero weight is still considered relevant.

Signature

ENGINE_API const TArray<FAnimTickRecord>& GetInstanceRelevantAssetPlayers() const;

Return Type

const TArray<FAnimTickRecord>&

Example

Query currently playing animation assets C++
const TArray<FAnimTickRecord>& Relevant = AnimInstance->GetInstanceRelevantAssetPlayers();
for (const FAnimTickRecord& Record : Relevant)
{
    if (UAnimSequenceBase* Anim = Cast<UAnimSequenceBase>(Record.SourceAsset))
    {
        UE_LOG(LogAnimation, Log, TEXT("Playing: %s"), *Anim->GetName());
    }
}

Version History

Introduced in: 4.11

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.