Show / Hide Table of Contents

Class AnimInstance

Anim Instance

Inheritance
System.Object
UObject
AnimInstance
AnimCustomInstance
AnimSingleNodeInstance
VehicleAnimInstance
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class AnimInstance : UObject

Properties

| Improve this Doc View Source

bQueueMontageEvents

Declaration
public bool bQueueMontageEvents { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bUseMultiThreadedAnimationUpdate

Declaration
public bool bUseMultiThreadedAnimationUpdate { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bUsingCopyPoseFromMesh

Declaration
public bool bUsingCopyPoseFromMesh { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CurrentSkeleton

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

Declaration
public Skeleton CurrentSkeleton { get; set; }
Property Value
Type Description
Skeleton
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static AnimInstance DefaultObject { get; }
Property Value
Type Description
AnimInstance
| Improve this Doc View Source

NotifyQueue

Animation Notifies that has been triggered in the latest tick *

Declaration
public AnimNotifyQueue NotifyQueue { get; set; }
Property Value
Type Description
AnimNotifyQueue
| Improve this Doc View Source

PostCompileValidationClassName

Name of Class to do Post Compile Validation.

Declaration
public SoftClassPath PostCompileValidationClassName { get; set; }
Property Value
Type Description
SoftClassPath
Remarks

See Class UAnimBlueprintPostCompileValidation.

| Improve this Doc View Source

RootMotionMode

Sets where this blueprint pulls Root Motion from

Declaration
public byte RootMotionMode { get; set; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

CalculateDirection(Vector, Rotator)

Returns degree of the angle betwee velocity and Rotation forward vector

Declaration
public float CalculateDirection(Vector Velocity, Rotator BaseRotation)
Parameters
Type Name Description
Vector Velocity
Rotator BaseRotation
Returns
Type Description
System.Single
Remarks

The range of return will be from [-180, 180], and this can be used to feed blendspace directional value

| Improve this Doc View Source

ClearMorphTargets()

Clears the current morph targets.

Declaration
public void ClearMorphTargets()
| Improve this Doc View Source

GetActiveCurveNames(EAnimCurveType)

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

Declaration
public IReadOnlyCollection<Name> GetActiveCurveNames(EAnimCurveType CurveType)
Parameters
Type Name Description
EAnimCurveType CurveType
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<Name>
| Improve this Doc View Source

GetAllCurveNames()

This returns all curve names

Declaration
public IReadOnlyCollection<Name> GetAllCurveNames()
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<Name>
| Improve this Doc View Source

GetCurrentActiveMontage()

Get a current Active Montage in this AnimInstance.

Declaration
public AnimMontage GetCurrentActiveMontage()
Returns
Type Description
AnimMontage
Remarks

Note that there might be multiple Active at the same time. This will only return the first active one it finds. *

| Improve this Doc View Source

GetCurrentStateName(Int32)

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

Declaration
public Name GetCurrentStateName(int MachineIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
Returns
Type Description
Name
| Improve this Doc View Source

GetCurveValue(Name)

Returns the value of a named curve.

Declaration
public float GetCurveValue(Name CurveName)
Parameters
Type Name Description
Name CurveName
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceAssetPlayerLength(Int32)

Gets the length in seconds of the asset referenced in an asset player node

Declaration
public float GetInstanceAssetPlayerLength(int AssetPlayerIndex)
Parameters
Type Name Description
System.Int32 AssetPlayerIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceAssetPlayerTime(Int32)

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

Declaration
public float GetInstanceAssetPlayerTime(int AssetPlayerIndex)
Parameters
Type Name Description
System.Int32 AssetPlayerIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceAssetPlayerTimeFraction(Int32)

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

Declaration
public float GetInstanceAssetPlayerTimeFraction(int AssetPlayerIndex)
Parameters
Type Name Description
System.Int32 AssetPlayerIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceAssetPlayerTimeFromEnd(Int32)

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

Declaration
public float GetInstanceAssetPlayerTimeFromEnd(int AssetPlayerIndex)
Parameters
Type Name Description
System.Int32 AssetPlayerIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceAssetPlayerTimeFromEndFraction(Int32)

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

Declaration
public float GetInstanceAssetPlayerTimeFromEndFraction(int AssetPlayerIndex)
Parameters
Type Name Description
System.Int32 AssetPlayerIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceCurrentStateElapsedTime(Int32)

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

Declaration
public float GetInstanceCurrentStateElapsedTime(int MachineIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceMachineWeight(Int32)

Get the blend weight of a specified state machine

Declaration
public float GetInstanceMachineWeight(int MachineIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceStateWeight(Int32, Int32)

Get the blend weight of a specified state

Declaration
public float GetInstanceStateWeight(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceTransitionCrossfadeDuration(Int32, Int32)

Get the crossfade duration of a specified transition

Declaration
public float GetInstanceTransitionCrossfadeDuration(int MachineIndex, int TransitionIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 TransitionIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceTransitionTimeElapsed(Int32, Int32)

Get the elapsed time in seconds of a specified transition

Declaration
public float GetInstanceTransitionTimeElapsed(int MachineIndex, int TransitionIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 TransitionIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInstanceTransitionTimeElapsedFraction(Int32, Int32)

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

Declaration
public float GetInstanceTransitionTimeElapsedFraction(int MachineIndex, int TransitionIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 TransitionIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetOwningActor()

Returns the owning actor of this AnimInstance

Declaration
public Actor GetOwningActor()
Returns
Type Description
Actor
| Improve this Doc View Source

GetOwningComponent()

Returns the skeletal mesh component that has created this AnimInstance

Declaration
public SkeletalMeshComponent GetOwningComponent()
Returns
Type Description
SkeletalMeshComponent
| Improve this Doc View Source

GetRelevantAnimLength(Int32, Int32)

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

Declaration
public float GetRelevantAnimLength(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetRelevantAnimTime(Int32, Int32)

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

Declaration
public float GetRelevantAnimTime(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetRelevantAnimTimeFraction(Int32, Int32)

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

Declaration
public float GetRelevantAnimTimeFraction(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetRelevantAnimTimeRemaining(Int32, Int32)

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

Declaration
public float GetRelevantAnimTimeRemaining(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetRelevantAnimTimeRemainingFraction(Int32, Int32)

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

Declaration
public float GetRelevantAnimTimeRemainingFraction(int MachineIndex, int StateIndex)
Parameters
Type Name Description
System.Int32 MachineIndex
System.Int32 StateIndex
Returns
Type Description
System.Single
| Improve this Doc View Source

GetSyncGroupPosition(Name)

Get Sync Group Position

Declaration
public MarkerSyncAnimPosition GetSyncGroupPosition(Name InSyncGroupName)
Parameters
Type Name Description
Name InSyncGroupName
Returns
Type Description
MarkerSyncAnimPosition
| Improve this Doc View Source

GetTimeToClosestMarker(Name, Name)

--- AI communication end ---

Declaration
public (float, bool) GetTimeToClosestMarker(Name SyncGroup, Name MarkerName)
Parameters
Type Name Description
Name SyncGroup
Name MarkerName
Returns
Type Description
System.ValueTuple<System.Single, System.Boolean>
| Improve this Doc View Source

HasMarkerBeenHitThisFrame(Name, Name)

Has Marker Been Hit This Frame

Declaration
public bool HasMarkerBeenHitThisFrame(Name SyncGroup, Name MarkerName)
Parameters
Type Name Description
Name SyncGroup
Name MarkerName
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsAnyMontagePlaying()

Returns true if any montage is playing currently. Doesn't mean it's active though, it could be blending out.

Declaration
public bool IsAnyMontagePlaying()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPlayingSlotAnimation(AnimSequenceBase, Name)

Return true if it's playing the slot animation

Declaration
public bool IsPlayingSlotAnimation(AnimSequenceBase Asset, Name SlotNodeName)
Parameters
Type Name Description
AnimSequenceBase Asset
Name SlotNodeName
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSyncGroupBetweenMarkers(Name, Name, Name, Boolean)

Is Sync Group Between Markers

Declaration
public bool IsSyncGroupBetweenMarkers(Name InSyncGroupName, Name PreviousMarker, Name NextMarker, bool bRespectMarkerOrder)
Parameters
Type Name Description
Name InSyncGroupName
Name PreviousMarker
Name NextMarker
System.Boolean bRespectMarkerOrder
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LockAIResources(Boolean, Boolean)

locks indicated AI resources of animated pawn DEPRECATED.

Declaration
public void LockAIResources(bool bLockMovement, bool LockAILogic)
Parameters
Type Name Description
System.Boolean bLockMovement
System.Boolean LockAILogic
Remarks

Use LockAIResourcesWithAnimation instead

| Improve this Doc View Source

Montage_GetBlendTime(AnimMontage)

Get the current blend time of the Montage.

Declaration
public float Montage_GetBlendTime(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Single
Remarks

If Montage reference is NULL, it will return the current blend time on the first active Montage found.

| Improve this Doc View Source

Montage_GetCurrentSection(AnimMontage)

Returns the name of the current animation montage section.

Declaration
public Name Montage_GetCurrentSection(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
Name
| Improve this Doc View Source

Montage_GetIsStopped(AnimMontage)

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

Declaration
public bool Montage_GetIsStopped(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Montage_GetPlayRate(AnimMontage)

Get PlayRate for Montage.

Declaration
public float Montage_GetPlayRate(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Single
Remarks

If Montage reference is NULL, PlayRate for any Active Montage will be returned. If Montage is not playing, 0 is returned.

| Improve this Doc View Source

Montage_GetPosition(AnimMontage)

Get Current Montage Position

Declaration
public float Montage_GetPosition(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Single
| Improve this Doc View Source

Montage_IsActive(AnimMontage)

Returns true if the animation montage is active. If the Montage reference is NULL, it will return true if any Montage is active.

Declaration
public bool Montage_IsActive(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Montage_IsPlaying(AnimMontage)

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

Declaration
public bool Montage_IsPlaying(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
Returns
Type Description
System.Boolean
Remarks

If reference is NULL, it will return true is ANY montage is currently active and playing.

| Improve this Doc View Source

Montage_JumpToSection(Name, AnimMontage)

Makes a montage jump to a named section. If Montage reference is NULL, it will do that to all active montages.

Declaration
public void Montage_JumpToSection(Name SectionName, AnimMontage Montage)
Parameters
Type Name Description
Name SectionName
AnimMontage Montage
| Improve this Doc View Source

Montage_JumpToSectionsEnd(Name, AnimMontage)

Makes a montage jump to the end of a named section. If Montage reference is NULL, it will do that to all active montages.

Declaration
public void Montage_JumpToSectionsEnd(Name SectionName, AnimMontage Montage)
Parameters
Type Name Description
Name SectionName
AnimMontage Montage
| Improve this Doc View Source

Montage_Pause(AnimMontage)

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

Declaration
public void Montage_Pause(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
| Improve this Doc View Source

Montage_Play(AnimMontage, Single, EMontagePlayReturnType, Single, Boolean)

Plays an animation montage. Returns the length of the animation montage in seconds. Returns 0.f if failed to play.

Declaration
public float Montage_Play(AnimMontage MontageToPlay, float InPlayRate, EMontagePlayReturnType ReturnValueType, float InTimeToStartMontageAt, bool bStopAllMontages)
Parameters
Type Name Description
AnimMontage MontageToPlay
System.Single InPlayRate
EMontagePlayReturnType ReturnValueType
System.Single InTimeToStartMontageAt
System.Boolean bStopAllMontages
Returns
Type Description
System.Single
| Improve this Doc View Source

Montage_Resume(AnimMontage)

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

Declaration
public void Montage_Resume(AnimMontage Montage)
Parameters
Type Name Description
AnimMontage Montage
| Improve this Doc View Source

Montage_SetNextSection(Name, Name, AnimMontage)

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.

Declaration
public void Montage_SetNextSection(Name SectionNameToChange, Name NextSection, AnimMontage Montage)
Parameters
Type Name Description
Name SectionNameToChange
Name NextSection
AnimMontage Montage
Remarks

... but when you want it to end, you can relink next section of Loop to be End to finish the montage, in which case, it stops looping by Loop->End.

@param SectionNameToChange : This should be the name of the Montage Section after which you want to insert a new next section @param NextSection : new next section

| Improve this Doc View Source

Montage_SetPlayRate(AnimMontage, Single)

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

Declaration
public void Montage_SetPlayRate(AnimMontage Montage, float NewPlayRate)
Parameters
Type Name Description
AnimMontage Montage
System.Single NewPlayRate
| Improve this Doc View Source

Montage_SetPosition(AnimMontage, Single)

Set position.

Declaration
public void Montage_SetPosition(AnimMontage Montage, float NewPosition)
Parameters
Type Name Description
AnimMontage Montage
System.Single NewPosition
| Improve this Doc View Source

Montage_Stop(Single, AnimMontage)

Stops the animation montage. If reference is NULL, it will stop ALL active montages.

Declaration
public void Montage_Stop(float InBlendOutTime, AnimMontage Montage)
Parameters
Type Name Description
System.Single InBlendOutTime
AnimMontage Montage
| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static AnimInstance New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
AnimInstance
| Improve this Doc View Source

PlaySlotAnimation(AnimSequenceBase, Name, Single, Single, Single, Int32)

Play Slot Animation

Declaration
public float PlaySlotAnimation(AnimSequenceBase Asset, Name SlotNodeName, float BlendInTime, float BlendOutTime, float InPlayRate, int LoopCount)
Parameters
Type Name Description
AnimSequenceBase Asset
Name SlotNodeName
System.Single BlendInTime
System.Single BlendOutTime
System.Single InPlayRate
System.Int32 LoopCount
Returns
Type Description
System.Single
| Improve this Doc View Source

PlaySlotAnimationAsDynamicMontage(AnimSequenceBase, Name, Single, Single, Single, Int32, Single, Single)

Play normal animation asset on the slot node by creating a dynamic UAnimMontage. You can only play one asset (whether montage or animsequence) at a time per SlotGroup.

Declaration
public AnimMontage PlaySlotAnimationAsDynamicMontage(AnimSequenceBase Asset, Name SlotNodeName, float BlendInTime, float BlendOutTime, float InPlayRate, int LoopCount, float BlendOutTriggerTime, float InTimeToStartMontageAt)
Parameters
Type Name Description
AnimSequenceBase Asset
Name SlotNodeName
System.Single BlendInTime
System.Single BlendOutTime
System.Single InPlayRate
System.Int32 LoopCount
System.Single BlendOutTriggerTime
System.Single InTimeToStartMontageAt
Returns
Type Description
AnimMontage
| Improve this Doc View Source

ResetDynamics(ETeleportType)

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

Declaration
public void ResetDynamics(ETeleportType InTeleportType)
Parameters
Type Name Description
ETeleportType InTeleportType
| Improve this Doc View Source

SavePoseSnapshot(Name)

Declaration
public void SavePoseSnapshot(Name SnapshotName)
Parameters
Type Name Description
Name SnapshotName
| Improve this Doc View Source

SetMorphTarget(Name, Single)

Sets a morph target to a certain weight.

Declaration
public void SetMorphTarget(Name MorphTargetName, float Value)
Parameters
Type Name Description
Name MorphTargetName
System.Single Value
| Improve this Doc View Source

SetRootMotionMode(Byte)

Set RootMotionMode

Declaration
public void SetRootMotionMode(byte Value)
Parameters
Type Name Description
System.Byte Value
| Improve this Doc View Source

SnapshotPose(PoseSnapshot)

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

Declaration
public void SnapshotPose(PoseSnapshot Snapshot)
Parameters
Type Name Description
PoseSnapshot Snapshot
Remarks

The snapshot is taken at the current LOD, so if for example you took the snapshot at LOD1 and then used it at LOD0 any bones not in LOD1 will use the reference pose

| Improve this Doc View Source

StopSlotAnimation(Single, Name)

Stops currently playing slot animation slot or all

Declaration
public void StopSlotAnimation(float InBlendOutTime, Name SlotNodeName)
Parameters
Type Name Description
System.Single InBlendOutTime
Name SlotNodeName
| Improve this Doc View Source

TryGetPawnOwner()

kismet event functions

Declaration
public Pawn TryGetPawnOwner()
Returns
Type Description
Pawn
| Improve this Doc View Source

UnlockAIResources(Boolean, Boolean)

unlocks indicated AI resources of animated pawn.

Declaration
public void UnlockAIResources(bool bUnlockMovement, bool UnlockAILogic)
Parameters
Type Name Description
System.Boolean bUnlockMovement
System.Boolean UnlockAILogic
Remarks

Will unlock only animation-locked resources. DEPRECATED. Use UnlockAIResourcesWithAnimation instead

Events

| Improve this Doc View Source

BlueprintBeginPlay

Executed when begin play is called on the owning component

Declaration
public event AnimInstance.BlueprintBeginPlay_delegate BlueprintBeginPlay
Event Type
Type Description
AnimInstance.BlueprintBeginPlay_delegate
| Improve this Doc View Source

BlueprintInitializeAnimation

Executed when the Animation is initialized

Declaration
public event AnimInstance.BlueprintInitializeAnimation_delegate BlueprintInitializeAnimation
Event Type
Type Description
AnimInstance.BlueprintInitializeAnimation_delegate
| Improve this Doc View Source

BlueprintPostEvaluateAnimation

Executed after the Animation is evaluated

Declaration
public event AnimInstance.BlueprintPostEvaluateAnimation_delegate BlueprintPostEvaluateAnimation
Event Type
Type Description
AnimInstance.BlueprintPostEvaluateAnimation_delegate
| Improve this Doc View Source

BlueprintUpdateAnimation

Executed when the Animation is updated

Declaration
public event AnimInstance.BlueprintUpdateAnimation_delegate BlueprintUpdateAnimation
Event Type
Type Description
AnimInstance.BlueprintUpdateAnimation_delegate

Operators

| Improve this Doc View Source

Implicit(IntPtr to AnimInstance)

Convert from IntPtr to UObject

Declaration
public static implicit operator AnimInstance(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
AnimInstance
  • Improve this Doc
  • View Source
Back to top Generated by DocFX