UAnimInstance::GetInstanceAssetPlayerTimeFromEndFraction
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintPureBlueprintThreadSafe
Description
Returns the remaining playback time of an asset player node as a normalized fraction (0.0 = at end, 1.0 = at start). Used inside AnimGraph getter nodes to drive transitions or blend logic based on how close the animation is to finishing.
Caveats & Gotchas
- • This function is marked BlueprintInternalUseOnly — it is intended for use by AnimGetter nodes inside the AnimGraph, not for arbitrary Blueprint logic. Calling it from an Event Graph won't behave as expected because AssetPlayerIndex is resolved at compile time.
- • Returns 0.0 if the asset player at the given index is not active or the index is out of range, so guard against that when driving blends.
Signature
ENGINE_API float GetInstanceAssetPlayerTimeFromEndFraction(int32 AssetPlayerIndex); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AssetPlayerIndex | int32 | Index of the asset player node within the anim graph. | — |
Return Type
float Example
Using in a custom AnimGetter transition rule C++
// Inside an AnimGraph transition rule using an AnimGetter:
// The engine resolves AssetPlayerIndex automatically at compile time.
float TimeRemaining = GetInstanceAssetPlayerTimeFromEndFraction(AssetPlayerIndex);
if (TimeRemaining < 0.1f)
{
// Transition away from this state
} Tags
Version History
Introduced in: 4.11
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?