UAnimInstance::GetInstanceAssetPlayerLength

Syntax

float GetInstanceAssetPlayerLength
(
    int32 AssetPlayerIndex
)

Remarks

NOTE: Derived anim getters

Anim getter functions can be defined for any instance deriving UAnimInstance . To do this the function must be marked BlueprintPure, and have the AnimGetter metadata entry set to "true". Following the instructions below, getters should appear correctly in the blueprint node context menu for the derived classes

A context string can be provided in the GetterContext metadata and can contain any (or none) of the following entries separated by a pipe (|) Transition - Only available in a transition rule AnimGraph - Only available in an animgraph (also covers state anim graphs) CustomBlend - Only available in a custom blend graph

Anim getters support a number of automatic parameters that will be baked at compile time to be passed to the functions. They will not appear as pins on the graph node. They are as follows: AssetPlayerIndex - Index of an asset player node to operate on, one getter will be added to the blueprint action list per asset node available MachineIndex - Index of a state machine in the animation blueprint, one getter will be added to the blueprint action list per state machine StateIndex - Index of a state inside a state machine, also requires MachineIndex. One getter will be added to the blueprint action list per state TransitionIndex - Index of a transition inside a state machine, also requires MachineIndex. One getter will be added to the blueprint action list per transitionGets the length in seconds of the asset referenced in an asset player node

References

Module

Engine

Header

Runtime/Engine/Classes/Animation/AnimInstance.h

Source

Runtime/Engine/Private/Animation/AnimInstance.cpp