UAnimInstance

Windows
MacOS
Linux

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...

 

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

 

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

USkeleton *

 

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.

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 FSmartNameMapping& Mapping,
    const FName& CurveName,
    float Value
)

Add curve float data using a curve Uid, the name of the curve will be resolved from the skeleton.

Public function

void

 

AddCurveValue

(
    const FName& CurveName,
    float Value
)

Add curve float data, using a curve name.

Public function

void

 

AddCurveValue

(
    const USkeleton::AnimCurveUID Uid,
    float Value
)

Add curve float data using a curve Uid, the name of the curve will be resolved from the skeleton

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 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

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

 

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 Const

float

 

CalculateDirection

(
    const FVector& Velocity,
    const FRotator& BaseRotation
)

Returns degree of the angle betwee velocity and Rotation forward vector The range of return will be from [-180, 180], and this can be used to feed blendspace directional value

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

 

ClearMontageInstanceReferences

(
    FAnimMontageInstance& InMontageIns...
)

Public function

void

 

ClearMorphTargets()

Clears the current morph targets.

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 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

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

int32

 

GetInstanceAssetPlayerIndex

(
    FName MachineName,
    FName StateName,
    FName InstanceName
)

Get the index of the specified instance asset player.

Public function

float

 

GetInstanceAssetPlayerLength

(
    int32 AssetPlayerIndex
)

Derived anim getters

Public function

TArray< FAni...

 

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

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

void

 

GetLinkedAnimGraphInstancesByTag

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

Runs through all nodes, attempting to find all linked instances that match the 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 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

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

FAnimNode_As...

 

GetRelevantAssetPlayerFromState

(
    int32 MachineIndex,
    int32 StateIndex
)

Gets the most relevant asset player in a specified state

Public function

FBoneContain...

 

GetRequiredBones()

Access the required bones array

Public function Const

const FBoneC...

 

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

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

FAnimNode_St...

 

GetStateMachineInstance

(
    int32 MachineIndex
)

Gets the runtime instance of the specified state machine

Public function

const FBaked...

 

GetStateMachineInstanceDesc

(
    FName MachineName
)

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

Public function

FAnimNode_St...

 

GetStateMachineInstanceFromName

(
    FName MachineName
)

Gets the runtime instance of the specified state machine by Name

Public function Const

int32

 

GetSyncGroupIndexFromName

(
    FName SyncGroupName
)

Returns the baked sync group index from the compile step

Public function Const

FMarkerSyncA...

 

GetSyncGroupPosition

(
    FName InSyncGroupName
)

Public function Const

bool

 

GetTimeToClosestMarker

(
    FName SyncGroup,
    FName MarkerName,
    float& OutMarkerTime
)

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 Virtual

bool

 

HandleNotify

(
    const FAnimNotifyEvent& AnimNotify...
)

Implementable custom function to handle notifies

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

 

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.

Public function Const

bool

 

IsSyncGroupBetweenMarkers

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

Public function

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 CurrentPosition,
    float PreviousPosition,
    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

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.

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. If reference is NULL, it will stop ALL active montages.

Public function

void

 

Montage_StopGroupByName

(
    float InBlendOutTime,
    FName GroupName
)

Stops all active montages belonging to a group.

Protected function Virtual

void

 

Montage_UpdateWeight

(
    float DeltaSeconds
)

Update weight of montages

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

 

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

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

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 FCurveEvaluationOption& Curv...
)

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

 

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 Const

bool

 

ShouldExtractRootMotion()

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

Protected 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 FAlphaBlend& BlendOut
)

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

(
    const FAnimNotifyEvent* AnimNo...
)

Public function Virtual Const

APawn *

 

TryGetPawnOwner()

Public function

void

 

UninitializeAnimation()

Public function

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.

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 Variables

Name Description

Public variable

uint8: 1

 

bCanUseParallelUpdateAnimation_DEPRECATED

DEPRECATED: No longer used.

Public variable

uint8: 1

 

bRunUpdatesInWorkerThreads_DEPRECATED

DEPRECATED: No longer used.

Public variable

uint8: 1

 

bWarnAboutBlueprintUsage_DEPRECATED

This variable is no longer used. Use bWarnAboutBlueprintUsage on the UAnimBlueprint to control this.

Public variable

float

 

DeltaTime_DEPRECATED

DeltaTime

Deprecated Functions

Name Description

Public function

void

 

ClearLayerOverlay

(
    TSubclassOf< UAnimInstance > InClas...
)

Function renamed, please use UnlinkAnimClassLayers

Public function Const

FAnimMontage...

 

GetActiveInstanceForMontage

(
    UAnimMontage const& Montage
)

Please use GetActiveInstanceForMontage(const UAnimMontage* Montage)

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

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

 

NativeUpdateAnimation_WorkerThread

(
    float DeltaSeconds
)

This function is only called for backwards-compatibility. It is no longer called on a worker thread.

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

float

 

PlaySlotAnimation

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

This function is deprecated, please use PlaySlotAnimationAsDynamicMontage instead.

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

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