UAnimInstance::GetInstanceAssetPlayerTimeFromEnd
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintPure
Description
Returns the time remaining in seconds until the end of the animation asset playing in the specified asset player node. Commonly used in transition rules to trigger a transition before the animation finishes.
Caveats & Gotchas
- • For looping animations, this reports time until the current loop iteration ends, not until the animation is ever 'done'. It will reset back to the full length at each loop boundary.
- • Like all AnimGetters, this uses previous-frame data (double-buffered). For tight transitions triggered right at the very end of a clip, consider using a notify instead to guarantee frame-accurate triggering.
Signature
UFUNCTION(BlueprintPure, Category="Animation|Asset Player", meta=(DisplayName="Time Remaining", BlueprintInternalUseOnly="true", AnimGetter="true", BlueprintThreadSafe))
ENGINE_API float GetInstanceAssetPlayerTimeFromEnd(int32 AssetPlayerIndex) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AssetPlayerIndex | int32 | Index of the asset player node as resolved by the anim getter system. | — |
Return Type
float Example
Transition rule: start blending 0.2s before clip ends C++
// In a Blueprint transition rule condition:
// 'Time Remaining' (auto-generated getter) <= 0.2
// This fires the transition when 200ms of the animation remains. See Also
Tags
Version History
Introduced in: 4.11
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?