UAnimInstance::GetInstanceAssetPlayerTimeFraction
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintPure
Description
Returns the current accumulated playback time as a normalized fraction (0.0–1.0) of the asset's total length for the specified asset player node.
Caveats & Gotchas
- • Returns 0.0 if the asset player's asset length is zero (e.g., a pose asset with no frames), which would otherwise cause a division by zero inside the engine.
- • Like other AnimGetters, this is double-buffered — reflects the previous frame's evaluated time, not the in-progress update.
Signature
UFUNCTION(BlueprintPure, Category="Animation|Asset Player", meta=(DisplayName="Current Time (ratio)", BlueprintInternalUseOnly="true", AnimGetter="true", BlueprintThreadSafe))
ENGINE_API float GetInstanceAssetPlayerTimeFraction(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
Internal usage — illustrative only C++
// Engine calls this via the AnimGetter system.
// In Blueprint, use the 'Current Time (ratio)' getter node
// generated per asset player in the state machine editor. See Also
Tags
Version History
Introduced in: 4.11
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?