UAnimInstance::GetInstanceAssetPlayerLength
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintPure
Description
Returns the total length in seconds of the animation asset referenced by the specified asset player node. Used internally by the Blueprint AnimGetter system to expose per-node length data to transition rules.
Caveats & Gotchas
- • Marked `BlueprintInternalUseOnly=true` — this function is not intended to be called directly from user Blueprint code. The anim getter system auto-generates one exposed getter node per asset player in the graph; use those nodes instead.
- • The index is resolved at compile time by the anim blueprint compiler. Passing an out-of-range index at runtime returns 0.0 without asserting, which can mask errors.
Signature
UFUNCTION(BlueprintPure, Category="Animation|Asset Player", meta=(DisplayName="Length", BlueprintInternalUseOnly="true", AnimGetter="true", BlueprintThreadSafe))
ENGINE_API float GetInstanceAssetPlayerLength(int32 AssetPlayerIndex) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AssetPlayerIndex | int32 | Index of the asset player node in the animation graph, as resolved by the anim getter system. | — |
Return Type
float Example
Called internally by AnimGetter — illustrative only C++
// The engine calls this internally; user-facing equivalent is the
// 'Length' getter node that appears in the Blueprint graph per asset player.
float Length = AnimInstance->GetInstanceAssetPlayerLength(AssetPlayerIndex); See Also
Tags
Version History
Introduced in: 4.11
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?