RealDocs

UAnimInstance::GetInstanceAssetPlayers

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

Description

Returns a read-only reference to the array of all active asset player tick records for this animation instance. Each record describes an asset player node that was ticked during the current update.

Caveats & Gotchas

  • The returned reference is only valid for the current frame. The array is rebuilt every animation update, so holding a reference across frames leads to stale or invalid data.
  • The array includes asset players from all state machines and blend nodes — it is not filtered by relevance. Use GetInstanceRelevantAssetPlayers if you only need the players that are actively contributing to the final pose.

Signature

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

Return Type

const TArray<FAnimTickRecord>&

Example

Iterate all active asset players C++
const TArray<FAnimTickRecord>& Players = AnimInstance->GetInstanceAssetPlayers();
for (const FAnimTickRecord& Record : Players)
{
    if (Record.SourceAsset)
    {
        UE_LOG(LogAnimation, Log, TEXT("Asset: %s, Weight: %.2f"),
            *Record.SourceAsset->GetName(), Record.EffectiveBlendWeight);
    }
}

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.