UAnimInstance

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Animation/AnimInstance.h"

Syntax

class UAnimInstance : public UObject

Variables

Name Description

Public variable

TArray< FAnimNo...

 

ActiveAnimNotifyEventReference

Public variable

TArray< FAnimNo...

 

ActiveAnimNotifyState

Currently Active AnimNotifyState, stored as a copy of the event as we need to call NotifyEnd on the event after a deletion in the editor.

Protected variable

TMap< class UAn...

 

ActiveMontagesMap

Map between Active Montages and their FAnimMontageInstance

Protected variable

FAnimInstancePr...

 

AnimInstanceProxy

Proxy object, nothing should access this from an externally-callable API as it is used as a scratch area on worker threads

Public variable

uint8: 1

 

bCreatedByLinkedAnimGraph

Flag to check if created by LinkedAnimGraph in ReinitializeLinkedAnimInstance

Public variable

uint8: 1

 

bNeedsUpdate

Flag to check back on the game thread that indicates we need to run PostUpdateAnimation() in the post-eval call

Public variable

uint8: 1

 

bPropagateNotifiesToLinkedInstances

Whether to propagate notifies to any linked anim instances

Public variable

uint8: 1

 

bReceiveNotifiesFromLinkedInstances

Whether to process notifies from any linked anim instances

Public variable

uint8: 1

 

bUseMainInstanceMontageEvaluationData

If true, linked instances will use the main instance's montage data.

Public variable

uint8: 1

 

bUseMultiThreadedAnimationUpdate

Allows this anim instance to update its native update, blend tree, montages and asset players on a worker thread.

Public variable

uint8: 1

 

bUsingCopyPoseFromMesh

If this AnimInstance has nodes using 'CopyPoseFromMesh' this will be true.

Public variable

double

 

CurrentLifeTimerScrubPosition

Current scrubbing playback position (only used when debugging in Persona)

Public variable

TObjectPtr< USk...

 

CurrentSkeleton

This is used to extract animation. If Mesh exists, this will be overwritten by Mesh->Skeleton

Public variable

FGraphTraversal...

 

DebugDataCounter

Public variable

double

 

LifeTimer

Maximum playback position ever reached (only used when debugging in Persona)

Public variable

TArray< struct ...

 

MontageInstances

AnimMontage instances that are running currently

Public variable

FAnimNotifyQueu...

 

NotifyQueue

Animation Notifies that has been triggered in the latest tick

Public variable

FOnAllMontageIn...

 

OnAllMontageInstancesEnded

Called when all Montage instances have ended.

Public variable

FOnMontageBlend...

 

OnMontageBlendingOut

Called when a montage starts blending out, whether interrupted or finished

Public variable

FOnMontageEnded...

 

OnMontageEnded

Called when a montage has ended, whether interrupted or finished

Public variable

FOnMontageStart...

 

OnMontageStarted

Called when a montage has started

Public variable

FPlayMontageAni...

 

OnPlayMontageNotifyBegin

Called when a montage hits a 'PlayMontageNotify' or 'PlayMontageNotifyWindow' begin

Public variable

FPlayMontageAni...

 

OnPlayMontageNotifyEnd

Called when a montage hits a 'PlayMontageNotify' or 'PlayMontageNotifyWindow' end

Public variable

ETeleportType

 

PendingDynamicResetTeleportType

Pending teleport type, set in ResetDynamics and cleared in UpdateAnimation

Public variable

FSoftClassPath

 

PostCompileValidationClassName

Name of Class to do Post Compile Validation.

Public variable

TEnumAsByte< ER...

 

RootMotionMode

Sets where this blueprint pulls Root Motion from.

Protected variable

TMap< FName, UE...

 

SlotGroupInertializationRequestMap

Inertialization requests gathered this frame. Gets reset in UpdateMontageEvaluationData

Constructors

Name Description

Public function

UAnimInstance

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function

~UAnimInstance()

Disable compiler-generated deprecation warnings by implementing our own destructor.

Functions

Name Description

Public function

void

 

AddCurveValue

(
    const FName& CurveName,
    float Value,
    bool bMorphtarget,
    bool bMaterial
)

Add curve float data, using a curve name.

Public function

void

 

AddExternalNotifyHandler

(
    UObject* ExternalHandlerObject,
    FName NotifyEventName
)

Allows other UObjects to bind custom event notifies similarly to the AnimBP

Public function

void

 

AddNativeStateEntryBinding

(
    const FName& MachineName,
    const FName& StateName,
    const FOnGraphStateChanged& Native...
)

Sets up a native state entry delegate from state with StateName, in the state machine with name MachineName.

Public function

void

 

AddNativeStateExitBinding

(
    const FName& MachineName,
    const FName& StateName,
    const FOnGraphStateChanged& Native...
)

Sets up a native state exit delegate from state with StateName, in the state machine with name MachineName.

Public function

void

 

AddNativeTransitionBinding

(
    const FName& MachineName,
    const FName& PrevStateName,
    const FName& NextStateName,
    const FCanTakeTransition& NativeTr...,
    const FName& TransitionName
)

Sets up a native transition delegate between states with PrevStateName and NextStateName, in the state machine with name MachineName.

Public function

FPoseSnapsho...

 

AddPoseSnapshot

(
    FName SnapshotName
)

Add an empty pose snapshot to the internal snapshot cache (or recycle an existing pose snapshot if the name is already in use)

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function Const

void

 

AppendAnimationCurveList

(
    EAnimCurveType Type,
    TMap< FName, float >& InOutCurveLi...
)

Append the type of curve to the OutCurveList specified by Curve Flags

Public function Virtual

void

 

ApplyAnimOverridesToCDO

(
    FCompilerResultsLog& MessageLog
)

Called on the newly created CDO during anim blueprint compilation to allow subclasses a chance to replace animations (experimental)

Public function Const

float

 

Blueprint_GetSlotMontageLocalWeight

(
    FName SlotNodeName
)

Get local weight of any montages this slot node is playing.

Public function

void

 

BlueprintBeginPlay()

Executed when begin play is called on the owning component

Public function

void

 

BlueprintInitializeAnimation()

Executed when the Animation is initialized

Public function

void

 

BlueprintLinkedAnimationLayersInitialized()

Executed when the all Linked Animation Layers are initialized

Public function

void

 

BlueprintPostEvaluateAnimation()

Executed after the Animation is evaluated

Public function

void

 

BlueprintThreadSafeUpdateAnimation

(
    float DeltaTime
)

Executed when the Animation Blueprint is updated on a worker thread, just prior to graph update

Public function

void

 

BlueprintUpdateAnimation

(
    float DeltaTimeX
)

Executed when the Animation is updated

Public function Const

float

 

CalcSlotMontageLocalWeight

(
    const FName& SlotNodeName
)

Get local weight of any montages this slot is playing.

Public function Virtual Const

bool

 

CanRunParallelWork()

Can this animation instance run Update or Evaluation work in parallel.

Public function Const

bool

 

CanTransitionSignature()

Public function

void

 

ClearAllTransitionEvents()

Removes all queued transition requests

Public function

void

 

ClearMontageInstanceReferences

(
    FAnimMontageInstance& InMontageIns...
)

Public function

void

 

ClearMorphTargets()

Clears the current morph targets.

Public function

void

 

ClearTransitionEvents

(
    const FName EventName
)

Removes all queued transition requests with the given event name

Public function

FRootMotionM...

 

ConsumeExtractedRootMotion

(
    float Alpha
)

Get current accumulated root motion, removing it from the AnimInstance in the process

Public function

void

 

CopyCurveValues

(
    const UAnimInstance& InSourceInsta...
)

Copy curves from external source

Protected function Virtual

FAnimInstanc...

 

CreateAnimInstanceProxy()

Override point for derived classes to create their own proxy objects (allows custom allocation)

Protected function Virtual

void

 

DestroyAnimInstanceProxy

(
    FAnimInstanceProxy* InProxy
)

Override point for derived classes to destroy their own proxy objects (allows custom allocation)

Public function

void

 

DispatchQueuedAnimEvents()

Dispatch AnimEvents (AnimNotifies, Montage Events) queued during UpdateAnimation()

Public function

void

 

DisplayDebug

(
    UCanvas* Canvas,
    const FDebugDisplayInfo& DebugDisp...,
    float& YL,
    float& YPos
)

Debug output for this anim instance. Info for SyncGroups, Graph, Montages, etc.

Public function Virtual

void

 

DisplayDebugInstance

(
    FDisplayDebugManager& DisplayDebug...,
    float& Indent
)

Display debug info about AnimInstance. Can be overridden to add custom info from child classes.

Public function

void

 

EndNotifyStates()

Triggers end on active notify states and clears the array

Public function

FAnimSubsyst...

 

FindSubsystem

(
    UScriptStruct* InSubsystemType
)

Find a subsystem's instance-resident data.

Public function

SubsystemTyp...

 

FindSubsystem()

Get a subsystem's instance-resident data. If no subsystem of the type exists this will return nullptr.

Public function

void

 

GatherDebugData

(
    FNodeDebugData& DebugData
)

Gather debug data from this instance proxy and the blend tree for display

Public function Const

void

 

GetActiveCurveNames

(
    EAnimCurveType CurveType,
    TArray< FName >& OutNames
)

This returns last up-to-date list of active curve names

Public function Const

FAnimMontage...

 

GetActiveInstanceForMontage

(
    const UAnimMontage* Montage
)

Get Active FAnimMontageInstance for given Montage asset.

Public function Const

FAnimMontage...

 

GetActiveMontageInstance()

Get Currently active montage instance.

Public function Const

void

 

GetAllCurveNames

(
    TArray< FName >& OutNames
)

This returns all curve names.

Public function Const

const TMap< ...

 

GetAnimationCurveList

(
    EAnimCurveType Type
)

Return the list of curves that are specified by type

Public function Const

const TMap< ...

 

GetAnimationCurves

(
    EAnimCurveType InCurveType
)

Get the current value of all animation curves

Public function Const

UAnimMontage...

 

GetCurrentActiveMontage()

Get a current Active Montage in this AnimInstance.

Public function

FName

 

GetCurrentStateName

(
    int32 MachineIndex
)

Returns the name of a currently active state in a state machine.

Public function Const

bool

 

GetCurveValue

(
    FName CurveName,
    float& OutValue
)

Returns value of named curved in OutValue, returns whether the curve was actually found or not.

Public function Const

float

 

GetCurveValue

(
    FName CurveName
)

Returns the value of a named curve.

Public function

bool

 

GetCurveValueWithDefault

(
    FName CurveName,
    float DefaultValue,
    float& OutValue
)

Returns whether a named curve was found, its value, and a default value when it's not found.

Public function Const

float

 

GetDeltaSeconds()

Get the current delta time

Public function Const

int32

 

GetInstanceAssetPlayerIndex

(
    FName MachineName,
    FName StateName,
    FName InstanceName
)

Get the index of the specified instance asset player.

Public function

float

 

GetInstanceAssetPlayerLength

(
    int32 AssetPlayerIndex
)

NOTE: Derived anim getters

Public function Const

TArray< cons...

 

GetInstanceAssetPlayers

(
    const FName& GraphName
)

Returns all Animation Nodes of FAnimNode_AssetPlayerBase class within the specified (named) Animation Graph

Public function

float

 

GetInstanceAssetPlayerTime

(
    int32 AssetPlayerIndex
)

Get the current accumulated time in seconds for an asset player node

Public function

float

 

GetInstanceAssetPlayerTimeFraction

(
    int32 AssetPlayerIndex
)

Get the current accumulated time as a fraction for an asset player node

Public function

float

 

GetInstanceAssetPlayerTimeFromEnd

(
    int32 AssetPlayerIndex
)

Get the time in seconds from the end of an animation in an asset player node

Public function

float

 

GetInstanceAssetPlayerTimeFromEndFraction

(
    int32 AssetPlayerIndex
)

Get the time as a fraction of the asset length of an animation in an asset player node

Public function

float

 

GetInstanceCurrentStateElapsedTime

(
    int32 MachineIndex
)

Get the current elapsed time of a state within the specified state machine

Public function

float

 

GetInstanceMachineWeight

(
    int32 MachineIndex
)

Get the blend weight of a specified state machine

Public function Const

TArray< cons...

 

GetInstanceRelevantAssetPlayers

(
    const FName& GraphName
)

Returns all Animation Nodes implementing FAnimNode_AssetPlayerRelevancyBase within the specified (named) Animation Graph

Public function

float

 

GetInstanceStateWeight

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the blend weight of a specified state

Public function

float

 

GetInstanceTransitionCrossfadeDuration

(
    int32 MachineIndex,
    int32 TransitionIndex
)

Get the crossfade duration of a specified transition

Public function

float

 

GetInstanceTransitionTimeElapsed

(
    int32 MachineIndex,
    int32 TransitionIndex
)

Get the elapsed time in seconds of a specified transition

Public function

float

 

GetInstanceTransitionTimeElapsedFraction

(
    int32 MachineIndex,
    int32 TransitionIndex
)

Get the elapsed time as a fraction of the crossfade duration of a specified transition

Public function Const

UAnimInstanc...

 

GetLinkedAnimGraphInstanceByTag

(
    FName InTag
)

Runs through all nodes, attempting to find the first linked instance by name/tag

Public function Const

UAnimInstanc...

 

GetLinkedAnimLayerInstanceByClass

(
    TSubclassOf< UAnimInstance > InClas...
)

Gets the first layer linked instance corresponding to the specified class

Public function Const

UAnimInstanc...

 

GetLinkedAnimLayerInstanceByGroup

(
    FName InGroup
)

Gets the layer linked instance corresponding to the specified group

Public function Const

UAnimInstanc...

 

GetLinkedAnimLayerInstanceByGroupAndClass

(
    FName InGroup,
    TSubclassOf< UAnimInstance > InClas...
)

Gets layer linked instance that matches group and class

Public function Const

void

 

GetLinkedAnimLayerInstancesByGroup

(
    FName InGroup,
    TArray< UAnimInstance* >& Out...
)

Runs through all nodes, attempting to find all distinct layer linked instances in the group

Public function

FAnimNode_Li...

 

GetLinkedInputPoseNode

(
    FName InSubInput,
    FName InGraph
)

Get a linked input pose node by name, given a named graph.

Public function Virtual Const

int32

 

GetLODLevel()

Get the 'animation' LOD level, which by default is the PredictedLODLevel of this anim instance's skeletal mesh component.

Public function

const FBaked...

 

GetMachineDescription

(
    IAnimClassInterface* AnimBluep...,
    FAnimNode_StateMachine* Machin...
)

Get the machine description for the specified instance.

Public function

FAnimMontage...

 

GetMontageInstanceForID

(
    int32 MontageInstanceID
)

Get the FAnimMontageInstance currently running that matches this ID.

Public function

TArray< FAni...

 

GetMutableInstanceAssetPlayers

(
    const FName& GraphName
)

Returns all Animation Nodes of FAnimNode_AssetPlayerBase class within the specified (named) Animation Graph

Public function

TArray< FAni...

 

GetMutableInstanceRelevantAssetPlayers

(
    const FName& GraphName
)

Returns all Animation Nodes of FAnimNode_AssetPlayerRelevancyBase class within the specified (named) Animation Graph

Public function Const

AActor *

 

GetOwningActor()

Returns the owning actor of this AnimInstance

Public function Const

USkeletalMes...

 

GetOwningComponent()

Returns the skeletal mesh component that has created this AnimInstance.

Public function Const

const FPoseS...

 

GetPoseSnapshot

(
    FName SnapshotName
)

Get a cached pose snapshot by name

Public function Const

bool

 

GetPropagateNotifiesToLinkedInstances()

Get whether to propagate notifies to any linked anim instances

Protected function

T &

 

GetProxyOnAnyThread()

Access the proxy but block if a task is currently in progress (and we are on the game thread) as it wouldn't be safe to access it

Protected function Const

const T &

 

GetProxyOnAnyThread()

Access the proxy but block if a task is currently in progress (and we are on the game thread) as it wouldn't be safe to access it

Protected function

T &

 

GetProxyOnGameThread()

Access the proxy but block if a task is currently in progress as it wouldn't be safe to access it

Protected function Const

const T &

 

GetProxyOnGameThread()

Access the proxy but block if a task is currently in progress as it wouldn't be safe to access it

Protected function Static

T *

 

GetProxyOnGameThreadStatic

(
    UAnimInstance* InAnimInstance
)

Access the proxy but block if a task is currently in progress as it wouldn't be safe to access it This is protected static member for allowing derived to access

Public function Const

bool

 

GetReceiveNotifiesFromLinkedInstances()

Get whether to process notifies from any linked anim instances

Public function

float

 

GetRelevantAnimLength

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the length in seconds of the most relevant animation in the source state

Public function

float

 

GetRelevantAnimTime

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the current accumulated time in seconds for the most relevant animation in the source state

Public function

float

 

GetRelevantAnimTimeFraction

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the current accumulated time as a fraction of the length of the most relevant animation in the source state

Public function

float

 

GetRelevantAnimTimeRemaining

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the time remaining in seconds for the most relevant animation in the source state

Public function

float

 

GetRelevantAnimTimeRemainingFraction

(
    int32 MachineIndex,
    int32 StateIndex
)

Get the time remaining as a fraction of the duration for the most relevant animation in the source state

Public function Const

const FAnimN...

 

GetRelevantAssetPlayerInterfaceFromState

(
    int32 MachineIndex,
    int32 StateIndex
)

Gets the most relevant asset player in a specified state

Public function Const

const FBoneC...

 

GetRequiredBones()

Access the required bones array

Public function

FBoneContain...

 

GetRequiredBones()

Access the required bones array

Public function Const

const FBoneC...

 

GetRequiredBonesOnAnyThread()

Access the required bones array

Public function Const

FAnimMontage...

 

GetRootMotionMontageInstance()

Root Motion.

Public function Const

USkeletalMes...

 

GetSkelMeshComponent()

Public function Const

float

 

GetSlotMontageGlobalWeight

(
    const FName& SlotNodeName
)

Get Global weight of any montages this slot node is playing.

Public function Const

float

 

GetSlotMontageLocalWeight

(
    const FName& SlotNodeName
)

Get local weight of any montages this slot node is playing.

Public function Const

float

 

GetSlotNodeGlobalWeight

(
    const FName& SlotNodeName
)

Get global weight in AnimGraph for this slot node.

Public function Const

int32

 

GetStateMachineIndex

(
    FName MachineName
)

Gets the index of the state machine matching MachineName

Public function

void

 

GetStateMachineIndexAndDescription

(
    FName InMachineName,
    int32& OutMachineIndex,
    const FBakedAnimationStateMachine&...
)

Public function Const

const FAnimN...

 

GetStateMachineInstance

(
    int32 MachineIndex
)

Gets the runtime instance of the specified state machine

Public function Const

const FBaked...

 

GetStateMachineInstanceDesc

(
    FName MachineName
)

Gets the runtime instance desc of the state machine specified by name

Public function Const

const FAnimN...

 

GetStateMachineInstanceFromName

(
    FName MachineName
)

Gets the runtime instance of the specified state machine by Name

Public function

SubsystemTyp...

 

GetSubsystem()

Get a subsystem's instance-resident data. If no subsystem of the type exists this will assert.

Public function Const

int32

 

GetSyncGroupIndexFromName

(
    FName SyncGroupName
)

Returns the baked sync group index from the compile step

Public function Const

const TMap< ...

 

GetSyncGroupMapRead()

Get the sync group we are currently reading from

Public function Const

FMarkerSyncA...

 

GetSyncGroupPosition

(
    FName InSyncGroupName
)

Public function Const

bool

 

GetTimeToClosestMarker

(
    FName SyncGroup,
    FName MarkerName,
    float& OutMarkerTime
)

Public function

const TArray...

 

GetUngroupedActivePlayersRead()

Get the ungrouped active player we are currently reading from

Public function Const

const FGraph...

 

GetUpdateCounter()

Access a read only version of the Updater Counter from the AnimInstanceProxy on the GameThread.

Public function Virtual Const

UWorld *

 

GetWorld()

Protected function Static

void

 

HandleExistingParallelEvaluationTask

(
    USkeletalMeshComponent* Compon...
)

Protected function Virtual

bool

 

HandleNotify

(
    const FAnimNotifyEvent& AnimNotify...
)

Implementable custom function to handle notifies

Public function Virtual

void

 

HandleObjectsReinstanced

(
    const TMap< UObject*, UObject ...
)

Helper function to handle reinstancing in editor.

Public function Const

bool

 

HasActiveCurves()

Check whether we have any active curves

Public function Const

bool

 

HasMarkerBeenHitThisFrame

(
    FName SyncGroup,
    FName MarkerName
)

Public function Const

bool

 

HasMorphTargetCurves()

Check whether we have active morph target curves

Public function

bool

 

HasNativeStateEntryBinding

(
    const FName& MachineName,
    const FName& StateName,
    FName& OutBindingName
)

Check for whether a native entry delegate is bound to the specified state.

Public function

bool

 

HasNativeStateExitBinding

(
    const FName& MachineName,
    const FName& StateName,
    FName& OutBindingName
)

Check for whether a native exit delegate is bound to the specified state.

Public function

bool

 

HasNativeTransitionBinding

(
    const FName& MachineName,
    const FName& PrevStateName,
    const FName& NextStateName,
    FName& OutBindingName
)

Check for whether a native rule is bound to the specified transition.

Public function

void

 

InitializeAnimation

(
    bool bInDeferRootNodeInitialization
)

Animation phase trigger start with initialize update happens in every tick.

Public function

void

 

InitializeGroupedLayers

(
    bool bInDeferSubGraphInitialization
)

Sets up initial layer groupings

Public function Const

bool

 

IsAnyMontagePlaying()

Returns true if any montage is playing currently.

Public function Const

bool

 

IsBeingDebugged()

Returns true if this anim instance is actively being debugged, false otherwise

Public function Const

bool

 

IsPlayingSlotAnimation

(
    const UAnimSequenceBase* Asset,
    FName SlotNodeName,
    UAnimMontage*& OutMontage
)

Return true if this instance playing the slot animation, also returning the montage it is playing on

Public function Const

bool

 

IsPlayingSlotAnimation

(
    const UAnimSequenceBase* Asset,
    FName SlotNodeName
)

Return true if it's playing the slot animation

Public function Const

bool

 

IsPostUpdatingAnimation()

Is this animation currently running post update

Public function Const

bool

 

IsRunningParallelEvaluation()

Are we being evaluated on a worker thread.

Protected function Static

bool

 

IsSkeletalMeshComponent

(
    const UObject* Object
)

Public function Const

bool

 

IsSlotActive

(
    FName SlotNodeName
)

Return true if this instance has an active montage in the given slot.

Public function Const

bool

 

IsSyncGroupBetweenMarkers

(
    FName InSyncGroupName,
    FName PreviousMarker,
    FName NextMarker,
    bool bRespectMarkerOrder
)

Public function Const

bool

 

IsUpdatingAnimation()

Is this animation currently running update

Public function Const

bool

 

IsUsingMainInstanceMontageEvaluationData()

Public function Virtual

void

 

LinkAnimClassLayers

(
    TSubclassOf< UAnimInstance > InClas...
)

Runs through all layer nodes, attempting to find layer nodes that are implemented by the specified class, then sets up a linked instance of the class for each.

Public function

void

 

LinkAnimGraphByTag

(
    FName InTag,
    TSubclassOf< UAnimInstance > InClas...
)

Runs through all nodes, attempting to find a linked instance by name/tag, then sets the class of each node if the tag matches

Public function

void

 

LockAIResources

(
    bool bLockMovement,
    bool LockAILogic
)

Locks indicated AI resources of animated pawn DEPRECATED. Use LockAIResourcesWithAnimation instead

Public function

void

 

MakeMontageTickRecord

(
    FAnimTickRecord& TickRecord,
    UAnimMontage* Montage,
    float MoveDelta,
    float Weight,
    TArray< FPassedMarker >& MarkersPa...,
    FMarkerTickRecord& MarkerTickRecor...
)

Protected function Virtual

void

 

Montage_Advance

(
    float DeltaSeconds
)

Advance montages

Public function

FOnMontageBl...

 

Montage_GetBlendingOutDelegate

(
    UAnimMontage* Montage
)

Get pointer to BlendingOutStarted delegate for Montage.

Public function Const

float

 

Montage_GetBlendTime

(
    const UAnimMontage* Montage
)

Get the current blend time of the Montage.

Public function Const

FName

 

Montage_GetCurrentSection

(
    const UAnimMontage* Montage
)

Returns the name of the current animation montage section.

Public function Const

float

 

Montage_GetEffectivePlayRate

(
    const UAnimMontage* Montage
)

Get scaled PlayRate for Montage.

Public function

FOnMontageEn...

 

Montage_GetEndedDelegate

(
    UAnimMontage* Montage
)

Get pointer to Ended delegate for Montage.

Public function Const

bool

 

Montage_GetIsStopped

(
    const UAnimMontage* Montage
)

Return true if Montage is not currently active. (not valid or blending out)

Public function Const

int32

 

Montage_GetNextSectionID

(
    const UAnimMontage* Montage,
    int32 const& CurrentSectionID
)

Get next sectionID for given section ID

Public function Const

float

 

Montage_GetPlayRate

(
    const UAnimMontage* Montage
)

Get PlayRate for Montage.

Public function Const

float

 

Montage_GetPosition

(
    const UAnimMontage* Montage
)

Get Current Montage Position

Public function Const

bool

 

Montage_IsActive

(
    const UAnimMontage* Montage
)

Returns true if the animation montage is active.

Public function Const

bool

 

Montage_IsPlaying

(
    const UAnimMontage* Montage
)

Returns true if the animation montage is currently active and playing.

Public function

void

 

Montage_JumpToSection

(
    FName SectionName,
    const UAnimMontage* Montage
)

Makes a montage jump to a named section.

Public function

void

 

Montage_JumpToSectionsEnd

(
    FName SectionName,
    const UAnimMontage* Montage
)

Makes a montage jump to the end of a named section.

Public function

void

 

Montage_Pause

(
    const UAnimMontage* Montage
)

Pauses the animation montage. If reference is NULL, it will pause ALL active montages.

Public function

float

 

Montage_Play

(
    UAnimMontage* MontageToPlay,
    float InPlayRate,
    EMontagePlayReturnType ReturnValueT...,
    float InTimeToStartMontageAt,
    bool bStopAllMontages
)

Plays an animation montage.

Protected function

float

 

Montage_PlayInternal

(
    UAnimMontage* MontageToPlay,
    const FMontageBlendSettings& Blend...,
    float InPlayRate,
    EMontagePlayReturnType ReturnValueT...,
    float InTimeToStartMontageAt,
    bool bStopAllMontages
)

Public function

float

 

Montage_PlayWithBlendIn

(
    UAnimMontage* MontageToPlay,
    const FAlphaBlendArgs& BlendIn,
    float InPlayRate,
    EMontagePlayReturnType ReturnValueT...,
    float InTimeToStartMontageAt,
    bool bStopAllMontages
)

Plays an animation montage.

Public function

float

 

Montage_PlayWithBlendSettings

(
    UAnimMontage* MontageToPlay,
    const FMontageBlendSettings& Blend...,
    float InPlayRate,
    EMontagePlayReturnType ReturnValueT...,
    float InTimeToStartMontageAt,
    bool bStopAllMontages
)

Plays an animation montage.

Public function

void

 

Montage_Resume

(
    const UAnimMontage* Montage
)

Resumes a paused animation montage. If reference is NULL, it will resume ALL active montages.

Public function

void

 

Montage_SetBlendingOutDelegate

(
    FOnMontageBlendingOutStarted& InOn...,
    UAnimMontage* Montage
)

Public function

void

 

Montage_SetEndDelegate

(
    FOnMontageEnded& InOnMontageEnded,
    UAnimMontage* Montage
)

Public function

void

 

Montage_SetNextSection

(
    FName SectionNameToChange,
    FName NextSection,
    const UAnimMontage* Montage
)

Relink new next section AFTER SectionNameToChange in run-time You can link section order the way you like in editor, but in run-time if you'd like to change it dynamically, use this function to relink the next section For example, you can have Start->Loop->Loop->Loop....

Public function

void

 

Montage_SetPlayRate

(
    const UAnimMontage* Montage,
    float NewPlayRate
)

Change AnimMontage play rate. NewPlayRate = 1.0 is the default playback rate.

Public function

void

 

Montage_SetPosition

(
    const UAnimMontage* Montage,
    float NewPosition
)

Set position.

Public function

void

 

Montage_Stop

(
    float InBlendOutTime,
    const UAnimMontage* Montage
)

Stops the animation montage.

Public function

void

 

Montage_StopGroupByName

(
    float InBlendOutTime,
    FName GroupName
)

Stops all active montages belonging to a group.

Protected function

void

 

Montage_StopInternal

(
    TFunctionRef< FMontageBlendSettings...,
    const UAnimMontage* Montage
)

Public function

void

 

Montage_StopWithBlendOut

(
    const FAlphaBlendArgs& BlendOut,
    const UAnimMontage* Montage
)

Same as Montage_Stop.

Public function

void

 

Montage_StopWithBlendSettings

(
    const FMontageBlendSettings& Blend...,
    const UAnimMontage* Montage
)

Same as Montage_Stop, but all blend settings are provided instead of using the ones on the montage asset

Protected function Virtual

void

 

Montage_UpdateWeight

(
    float DeltaSeconds
)

Update weight of montages

Public function

void

 

MontageSync_Follow

(
    const UAnimMontage* MontageFol...,
    const UAnimInstance* OtherAnim...,
    const UAnimMontage* MontageLea...
)

Synchronize a montage to another anim instance's montage. Both montages must be playing already

Public function

void

 

MontageSync_StopFollowing

(
    const UAnimMontage* MontageFol...
)

Stop following the montage's leader in this anim instance

Public function Virtual

void

 

NativeBeginPlay()

Executed when begin play is called on the owning component.

Public function Virtual

void

 

NativeInitializeAnimation()

The below functions are the native overrides for each phase Native initialization override point

Public function Virtual

void

 

NativePostEvaluateAnimation()

Native Post Evaluate override point.

Public function Virtual

void

 

NativeThreadSafeUpdateAnimation

(
    float DeltaSeconds
)

Native thread safe update override point.

Public function Virtual

void

 

NativeUninitializeAnimation()

Native Uninitialize override point.

Public function Virtual

void

 

NativeUpdateAnimation

(
    float DeltaSeconds
)

Native update override point.

Public function Const

bool

 

NeedsUpdate()

Can does this anim instance need an update (parallel or not)?

Public function Virtual

void

 

OnMontageInstanceStopped

(
    FAnimMontageInstance& StoppedMonta...
)

Public function Virtual

void

 

OnUROPreInterpolation_AnyThread

(
    FAnimationEvaluationContext& InOut...
)

Called before URO interpolation is performed.

Public function Virtual

void

 

OnUROSkipTickAnimation()

Called when skipping an animation update because of URO.

Public function Const

bool

 

ParallelCanEvaluate

(
    const USkeletalMesh* InSkeleta...
)

Check whether evaluation can be performed on the supplied skeletal mesh.

Public function

void

 

ParallelEvaluateAnimation

(
    bool bForceRefPose,
    const USkeletalMesh* InSkeleta...,
    FParallelEvaluationData& OutAnimat...
)

Perform evaluation. Can be called from worker threads.

Public function

void

 

ParallelUpdateAnimation()

Run update animation work on a worker thread

Public function Virtual Const

bool

 

PCV_ShouldNotifyAboutNodesNotUsingFastPath()

Public function Virtual Const

bool

 

PCV_ShouldWarnAboutNodesNotUsingFastPath()

Warn if AnimNodes are not using fast path during AnimBP compilation.

Public function

UAnimMontage...

 

PlaySlotAnimationAsDynamicMontage

(
    UAnimSequenceBase* Asset,
    FName SlotNodeName,
    float BlendInTime,
    float BlendOutTime,
    float InPlayRate,
    int32 LoopCount,
    float BlendOutTriggerTime,
    float InTimeToStartMontageAt
)

Play normal animation asset on the slot node by creating a dynamic UAnimMontage.

Public function

UAnimMontage...

 

PlaySlotAnimationAsDynamicMontage_WithBlendArgs

(
    UAnimSequenceBase* Asset,
    FName SlotNodeName,
    const FAlphaBlendArgs& BlendIn,
    const FAlphaBlendArgs& BlendOut,
    float InPlayRate,
    int32 LoopCount,
    float BlendOutTriggerTime,
    float InTimeToStartMontageAt
)

Play normal animation asset on the slot node by creating a dynamic UAnimMontage with blend in arguments.

Public function

UAnimMontage...

 

PlaySlotAnimationAsDynamicMontage_WithBlendSettings

(
    UAnimSequenceBase* Asset,
    FName SlotNodeName,
    const FMontageBlendSettings& Blend...,
    const FMontageBlendSettings& Blend...,
    float InPlayRate,
    int32 LoopCount,
    float BlendOutTriggerTime,
    float InTimeToStartMontageAt
)

Play normal animation asset on the slot node by creating a dynamic UAnimMontage with blend in settings.

Public function

void

 

PostEvaluateAnimation()

Public function

void

 

PostUpdateAnimation()

Called after updates are completed, dispatches notifies etc.

Public function

void

 

PreEvaluateAnimation()

Called on the game thread pre-evaluation.

Protected function Virtual

void

 

PreUpdateAnimation

(
    float DeltaSeconds
)

Called to setup for updates

Public function Virtual

void

 

PreUpdateLinkedInstances

(
    float DeltaSeconds
)

Called on the game thread before UpdateAnimation is called on linked instances

Public function

bool

 

QueryAndMarkTransitionEvent

(
    int32 MachineIndex,
    int32 TransitionIndex,
    FName EventName
)

Behaves like QueryTransitionEvent but additionally marks the event for consumption

Public function

bool

 

QueryTransitionEvent

(
    int32 MachineIndex,
    int32 TransitionIndex,
    FName EventName
)

Returns whether or not the given event transition request has been queued

Public function

void

 

QueueMontageBlendingOutEvent

(
    const FQueuedMontageBlendingOutEven...
)

Queue a Montage BlendingOut Event to be triggered.

Public function

void

 

QueueMontageEndedEvent

(
    const FQueuedMontageEndedEvent& Mo...
)

Queue a Montage Ended Event to be triggered.

Public function

void

 

QueueRootMotionBlend

(
    const FTransform& RootTransform,
    const FName& SlotName,
    float Weight
)

Queue blended root motion.

Public function

void

 

RecalcRequiredBones()

Recalculate Required Bones [RequiredBones] Is called when bRequiredBonesUpToDate = false

Public function

void

 

RecalcRequiredCurves

(
    const UE::Anim::FCurveFilterSetting...
)

Recalculate Required Curves based on Required Bones [RequiredBones]

Public function

void

 

RecordMachineWeight

(
    const int32 InMachineClassIndex,
    const float InMachineWeight
)

Given a machine index, record a state machine weight for this frame

Public function

void

 

RecordStateWeight

(
    const int32 InMachineClassIndex,
    const int32 InStateIndex,
    const float InStateWeight,
    const float InElapsedTime
)

Given a machine and state index, record a state weight for this frame

Public function

void

 

RefreshCurves

(
    USkeletalMeshComponent* Compon...
)

Refresh currently existing curves

Public function

void

 

RemoveExternalNotifyHandler

(
    UObject* ExternalHandlerObject,
    FName NotifyEventName
)

Other UObjects should call this to remove themselves from the callbacks

Public function

void

 

RemovePoseSnapshot

(
    FName SnapshotName
)

Remove a previously saved pose snapshot from the internal snapshot cache

Public function

void

 

RequestMontageInertialization

(
    const UAnimMontage* Montage,
    float Duration,
    const UBlendProfile* BlendProf...
)

Builds an inertialization request from the montage's group, provided duration and optional blend profile

Public function

void

 

RequestSlotGroupInertialization

(
    FName InSlotGroupName,
    float Duration,
    const UBlendProfile* BlendProf...
)

Requests an inertial blend during the next anim graph update.

Public function

bool

 

RequestTransitionEvent

(
    const FName EventName,
    const double RequestTimeout,
    const ETransitionRequestQueueMode Q...,
    const ETransitionRequestOverwriteMo...
)

Attempts to queue a transition request, returns true if the request was successful

Public function

void

 

ResetDynamics

(
    ETeleportType InTeleportType
)

Reset any dynamics running simulation-style updates (e.g. on teleport, time skip etc.)

Public function Virtual

void

 

SavePoseSnapshot

(
    FName SnapshotName
)

Takes a snapshot of the current skeletal mesh component pose & saves it internally.

Public function

void

 

SetMorphTarget

(
    FName MorphTargetName,
    float Value
)

Sets a morph target to a certain weight.

Public function

void

 

SetPropagateNotifiesToLinkedInstances

(
    bool bSet
)

Set whether to propagate notifies to any linked anim instances

Public function

void

 

SetReceiveNotifiesFromLinkedInstances

(
    bool bSet
)

Set whether to process notifies from any linked anim instances

Public function

void

 

SetRootMotionMode

Set RootMotionMode

Public function

void

 

SetUseMainInstanceMontageEvaluationData

(
    bool bSet
)

Public function Const

bool

 

ShouldExtractRootMotion()

Should Extract Root Motion or not. Return true if we do.

Public function Virtual Const

bool

 

ShouldTriggerAnimNotifyState

(
    const UAnimNotifyState* AnimNo...
)

Return whether this AnimNotifyState should be triggered

Public function Virtual

void

 

SnapshotPose

(
    FPoseSnapshot& Snapshot
)

Takes a snapshot of the current skeletal mesh component pose and saves it to the specified snapshot.

Public function

void

 

StopAllMontages

(
    float BlendOut
)

Stop all montages that are active

Protected function

void

 

StopAllMontagesByGroupName

(
    FName InGroupName,
    const FMontageBlendSettings& Blend...
)

Stop all active montages belonging to 'InGroupName'

Public function

void

 

StopSlotAnimation

(
    float InBlendOutTime,
    FName SlotNodeName
)

Stops currently playing slot animation slot or all

Public function

void

 

SwapCurveWithEvaluationContext

(
    FAnimationEvaluationContext& InOut...
)

Swap curves out for evaluation

Public function

void

 

TriggerAnimNotifies

(
    float DeltaSeconds
)

Trigger AnimNotifies

Public function

void

 

TriggerSingleAnimNotify

(
    FAnimNotifyEventReference& EventRe...
)

Trigger an AnimNotify using an EventReference that provide context used in derived notify events

Public function

void

 

TriggerSingleAnimNotify

(
    const FAnimNotifyEvent* AnimNo...
)

Trigger an AnimNotify. Note that this version does not provide any context for the event

Public function Virtual Const

APawn *

 

TryGetPawnOwner()

Public function

void

 

UninitializeAnimation()

Public function Virtual

void

 

UnlinkAnimClassLayers

(
    TSubclassOf< UAnimInstance > InClas...
)

Runs through all layer nodes, attempting to find layer nodes that are currently running the specified class, then resets each to its default value.

Public function

void

 

UnlockAIResources

(
    bool bUnlockMovement,
    bool UnlockAILogic
)

Unlocks indicated AI resources of animated pawn.

Public function

void

 

UpdateAnimation

(
    float DeltaSeconds,
    bool bNeedsValidRootMotion,
    EUpdateAnimationFlag UpdateFlag
)

Update Animation code-paths, updates and advances animation state, returns whether or not the actual update should have been called immediately

Public function

void

 

UpdateCurves

(
    const FBlendedHeapCurve& InCurves
)

Update all internal curves from Blended Curve

Public function

void

 

UpdateCurvesPostEvaluation()

Update curves once evaluation has taken place. Mostly pushes curves to materials/morphs

Protected function

void

 

UpdateCurvesToComponents

(
    USkeletalMeshComponent* Compon...
)

Update animation curves to component

Public function

void

 

UpdateCurvesToEvaluationContext

(
    const FAnimationEvaluationContext&...
)

Pushes blended heap curve to output curves in the proxy using required bones cached data

Protected function

void

 

UpdateMontageEvaluationData()

Updates the montage data used for evaluation based on the current playing montages.

Protected function

bool

 

UpdateSnapshotAndSkipRemainingUpdate()

Returns true if a snapshot is being played back and the remainder of Update should be skipped.

Public function

bool

 

WasAnimNotifyNameTriggeredInAnyState

(
    FName NotifyName
)

Get whether the animation notify with the specified name triggered last tick.

Public function

bool

 

WasAnimNotifyNameTriggeredInSourceState

(
    int32 MachineIndex,
    int32 StateIndex,
    FName NotifyName
)

Get whether the most relevant animation triggered the animation notify with the specified name last tick..

Public function

bool

 

WasAnimNotifyNameTriggeredInStateMachine

(
    int32 MachineIndex,
    FName NotifyName
)

Get whether the given state machine triggered the animation notify with the specified name last tick.

Public function

bool

 

WasAnimNotifyStateActiveInAnyState

(
    TSubclassOf< UAnimNotifyState > Ani...
)

Get whether a particular notify state was active in any state machine last tick.

Public function

bool

 

WasAnimNotifyStateActiveInSourceState

(
    int32 MachineIndex,
    int32 StateIndex,
    TSubclassOf< UAnimNotifyState > Ani...
)

Get whether a particular notify state is active in a specific state last tick.

Public function

bool

 

WasAnimNotifyStateActiveInStateMachine

(
    int32 MachineIndex,
    TSubclassOf< UAnimNotifyState > Ani...
)

Get whether a particular notify state is active in a specific state machine last tick.

Public function

bool

 

WasAnimNotifyTriggeredInAnyState

(
    TSubclassOf< UAnimNotify > AnimNoti...
)

Get whether an animation notify of a given type was triggered last tick.

Public function

bool

 

WasAnimNotifyTriggeredInSourceState

(
    int32 MachineIndex,
    int32 StateIndex,
    TSubclassOf< UAnimNotify > AnimNoti...
)

Get whether the most relevant animation was in a particular notify state last tick.

Public function

bool

 

WasAnimNotifyTriggeredInStateMachine

(
    int32 MachineIndex,
    TSubclassOf< UAnimNotify > AnimNoti...
)

Get whether a particular notify type was active in a specific state machine last tick.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Enums

Name

Description

Public enum

EUpdateAnimationFlag

Flag passed to UpdateAnimation, determines the path we follow

Typedefs

Name

Description

ProxyType

Deprecated Functions

Name Description

Public function

void

 

AddCurveValue

(
    const FSmartNameMapping& Mapping,
    const FName& CurveName,
    float Value
)

Please use AddCurveValue that takes a CurveName

Public function

void

 

AddCurveValue

(
    const SmartName::UID_Type Uid,
    float Value
)

Please use AddCurveValue that takes a CurveName

Public function Const

float

 

CalculateDirection

(
    const FVector& Velocity,
    const FRotator& BaseRotation
)

Please use UKismetAnimationLibrary::CalculateDirection instead

Public function

void

 

ClearLayerOverlay

(
    TSubclassOf< UAnimInstance > InClas...
)

Function renamed, please use UnlinkAnimClassLayers

Public function Const

void

 

GetAnimationCurveList

(
    EAnimCurveType Type,
    TMap< FName, float >& InOutCurveLi...
)

This function is deprecated. Use AppendAnimationCurveList instead.

Public function Const

UAnimInstanc...

 

GetLayerSubInstanceByClass

(
    TSubclassOf< UAnimInstance > InClas...
)

Function renamed, please use GetLinkedAnimLayerInstanceByClass

Public function Const

UAnimInstanc...

 

GetLayerSubInstanceByGroup

(
    FName InGroup
)

Function renamed, please use GetLinkedAnimLayerInstanceByGroup

Public function Const

void

 

GetLinkedAnimGraphInstancesByTag

(
    FName InTag,
    TArray< UAnimInstance* >& Out...
)

Tags are unique so this function is no longer supported. Please use GetLinkedAnimGraphInstanceByTag instead

Public function Const

const FAnimN...

 

GetRelevantAssetPlayerFromState

(
    int32 MachineIndex,
    int32 StateIndex
)

Please use GetRelevantAssetPlayerInterfaceFromState

Public function

FAnimNode_Li...

 

GetSubInputNode

(
    FName InSubInput,
    FName InGraph
)

Function renamed, please use GetLinkedInputPoseNode

Public function Const

UAnimInstanc...

 

GetSubInstanceByTag

(
    FName InTag
)

Function renamed, please use GetLinkedAnimGraphInstanceByTag

Public function Const

void

 

GetSubInstancesByTag

(
    FName InTag,
    TArray< UAnimInstance* >& Out...
)

Function renamed, please use GetLinkedAnimGraphInstancesByTag

Public function Virtual

void

 

OnUROPreInterpolation()

This function is deprecated, please use OnUROPreInterpolation_AnyThread

Public function

void

 

ParallelEvaluateAnimation

(
    bool bForceRefPose,
    const USkeletalMesh* InSkeleta...,
    FBlendedHeapCurve& OutCurve,
    FCompactPose& OutPose
)

Please use ParallelEvaluateAnimation with different signature.

Public function

void

 

RecalcRequiredCurves

(
    const FCurveEvaluationOption& Curv...
)

Please use RecalcRequiredCurves that takes a FCurveFilterSettings.

Public function

void

 

ResetDynamics()

Please use ResetDynamics with a ETeleportType argument

Public function

void

 

SetLayerOverlay

(
    TSubclassOf< UAnimInstance > InClas...
)

Function renamed, please use LinkAnimClassLayers

Public function

void

 

SetSubInstanceClassByTag

(
    FName InTag,
    TSubclassOf< UAnimInstance > InClas...
)

Function renamed, please use LinkAnimGraphByTag

Protected function

void

 

StopAllMontagesByGroupName

(
    FName InGroupName,
    const FAlphaBlend& BlendOut
)

Use StopAllMontagesByGroupName with other signature.

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