UAnimInstance::GetInstanceAssetPlayerLength

Derived anim getters

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Animation/AnimInstance.h

Include

#include "Animation/AnimInstance.h"

Source

/Engine/Source/Runtime/Engine/Private/Animation/AnimInstance.cpp

Syntax

float GetInstanceAssetPlayerLength
(
    int32 AssetPlayerIndex
)

Remarks

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss