UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAnimNode_RandomPlayer Struct Reference

#include <AnimNode_RandomPlayer.h>

+ Inheritance diagram for FAnimNode_RandomPlayer:

Public Member Functions

ANIMGRAPHRUNTIME_API FAnimNode_RandomPlayer ()
 
virtual ANIMGRAPHRUNTIME_API void Initialize_AnyThread (const FAnimationInitializeContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void Update_AnyThread (const FAnimationUpdateContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void Evaluate_AnyThread (FPoseContext &Output) override
 
virtual ANIMGRAPHRUNTIME_API void GatherDebugData (FNodeDebugData &DebugData) override
 
virtual ANIMGRAPHRUNTIME_API UAnimationAssetGetAnimAsset () const override
 
virtual ANIMGRAPHRUNTIME_API float GetAccumulatedTime () const override
 
virtual ANIMGRAPHRUNTIME_API bool GetIgnoreForRelevancyTest () const override
 
virtual ANIMGRAPHRUNTIME_API bool SetIgnoreForRelevancyTest (bool bInIgnoreForRelevancyTest) override
 
virtual ANIMGRAPHRUNTIME_API float GetCachedBlendWeight () const override
 
virtual ANIMGRAPHRUNTIME_API void ClearCachedBlendWeight () override
 
virtual ANIMGRAPHRUNTIME_API const FDeltaTimeRecordGetDeltaTimeRecord () const override
 
- Public Member Functions inherited from FAnimNode_AssetPlayerRelevancyBase
virtual ENGINE_API void SetAccumulatedTime (float NewTime)
 
virtual ENGINE_API float GetCurrentAssetLength () const
 
virtual ENGINE_API float GetCurrentAssetTime () const
 
virtual ENGINE_API float GetCurrentAssetTimePlayRateAdjusted () const
 
virtual ENGINE_API bool IsLooping () const
 
- Public Member Functions inherited from FAnimNode_Base
virtual ENGINE_API void CacheBones_AnyThread (const FAnimationCacheBonesContext &Context)
 
virtual ENGINE_API void EvaluateComponentSpace_AnyThread (FComponentSpacePoseContext &Output)
 
virtual bool CanUpdateInWorkerThread () const
 
virtual bool HasPreUpdate () const
 
virtual void PreUpdate (const UAnimInstance *InAnimInstance)
 
virtual bool NeedsDynamicReset () const
 
virtual ENGINE_API void ResetDynamics (ETeleportType InTeleportType)
 
virtual void PostCompile (const class USkeleton *InSkeleton)
 
virtual bool NeedsOnInitializeAnimInstance () const
 
virtual ~FAnimNode_Base ()
 
virtual void ResetDynamics ()
 
virtual bool WantsSkippedUpdates () const
 
virtual void OnUpdatesSkipped (TArrayView< const FAnimationUpdateContext * > SkippedUpdateContexts)
 
virtual void OverrideAsset (class UAnimationAsset *NewAsset)
 
ENGINE_API const FExposedValueHandlerGetEvaluateGraphExposedInputs () const
 
void SetExposedValueHandler (const FExposedValueHandler *Handler)
 
int32 GetNodeIndex () const
 
const IAnimClassInterfaceGetAnimClassInterface () const
 

Public Attributes

TArray< FRandomPlayerSequenceEntryEntries
 
bool bShuffleMode
 

Protected Attributes

float BlendWeight = 0.0f
 

Additional Inherited Members

- Protected Member Functions inherited from FAnimNode_Base
template<typename DataType >
const DataType & GetData (UE::Anim::FNodeDataId InId, const UObject *InObject=nullptr) const
 
template<typename DataType >
DataType * GetInstanceDataPtr (UE::Anim::FNodeDataId InId, UObject *InObject=nullptr)
 
ENGINE_API bool IsLODEnabled (FAnimInstanceProxy *AnimInstanceProxy)
 
virtual int32 GetLODThreshold () const
 
virtual ENGINE_API void OnInitializeAnimInstance (const FAnimInstanceProxy *InProxy, const UAnimInstance *InAnimInstance)
 

Constructor & Destructor Documentation

◆ FAnimNode_RandomPlayer()

FAnimNode_RandomPlayer::FAnimNode_RandomPlayer ( )

Member Function Documentation

◆ ClearCachedBlendWeight()

void FAnimNode_RandomPlayer::ClearCachedBlendWeight ( )
overridevirtual

Set the cached blendweight to zero

Reimplemented from FAnimNode_AssetPlayerRelevancyBase.

◆ Evaluate_AnyThread()

void FAnimNode_RandomPlayer::Evaluate_AnyThread ( FPoseContext Output)
overridevirtual

Called to evaluate local-space bones transforms according to the weights set up in Update(). You should implement either Evaluate or EvaluateComponentSpace, but not both of these. This can be called on any thread.

Parameters
OutputOutput structure to write pose or curve data to. Also provides access to relevant data as a context.

Reimplemented from FAnimNode_Base.

◆ GatherDebugData()

void FAnimNode_RandomPlayer::GatherDebugData ( FNodeDebugData DebugData)
overridevirtual

Called to gather on-screen debug data. This is called on the game thread.

Parameters
DebugDataDebug data structure used to output any relevant data

Reimplemented from FAnimNode_Base.

◆ GetAccumulatedTime()

float FAnimNode_RandomPlayer::GetAccumulatedTime ( ) const
overridevirtual

Get the currently referenced time within the asset player node

Reimplemented from FAnimNode_AssetPlayerRelevancyBase.

◆ GetAnimAsset()

UAnimationAsset * FAnimNode_RandomPlayer::GetAnimAsset ( ) const
overridevirtual

Get the animation asset associated with the node, derived classes should implement this

Reimplemented from FAnimNode_AssetPlayerRelevancyBase.

◆ GetCachedBlendWeight()

float FAnimNode_RandomPlayer::GetCachedBlendWeight ( ) const
overridevirtual

Get the last encountered blend weight for this node

Reimplemented from FAnimNode_AssetPlayerRelevancyBase.

◆ GetDeltaTimeRecord()

const FDeltaTimeRecord * FAnimNode_RandomPlayer::GetDeltaTimeRecord ( ) const
overridevirtual

Get the delta time record owned by this asset player (or null)

Reimplemented from FAnimNode_AssetPlayerRelevancyBase.

◆ GetIgnoreForRelevancyTest()

bool FAnimNode_RandomPlayer::GetIgnoreForRelevancyTest ( ) const
overridevirtual

◆ Initialize_AnyThread()

void FAnimNode_RandomPlayer::Initialize_AnyThread ( const FAnimationInitializeContext Context)
overridevirtual

Called when the node first runs. If the node is inside a state machine or cached pose branch then this can be called multiple times. This can be called on any thread.

Parameters
ContextContext structure providing access to relevant data

Reimplemented from FAnimNode_Base.

◆ SetIgnoreForRelevancyTest()

bool FAnimNode_RandomPlayer::SetIgnoreForRelevancyTest ( bool  bInIgnoreForRelevancyTest)
overridevirtual

◆ Update_AnyThread()

void FAnimNode_RandomPlayer::Update_AnyThread ( const FAnimationUpdateContext Context)
overridevirtual

Called to update the state of the graph relative to this node. Generally this should configure any weights (etc.) that could affect the poses that will need to be evaluated. This function is what usually executes EvaluateGraphExposedInputs. This can be called on any thread.

Parameters
ContextContext structure providing access to relevant data

Reimplemented from FAnimNode_Base.

Member Data Documentation

◆ BlendWeight

float FAnimNode_RandomPlayer::BlendWeight = 0.0f
protected

Last encountered blend weight for this node

◆ bShuffleMode

bool FAnimNode_RandomPlayer::bShuffleMode

When shuffle mode is active we will never loop a sequence beyond MaxLoopCount without visiting each sequence in turn (no repeats). Enabling this will ignore ChanceToPlay for each entry

◆ Entries

TArray<FRandomPlayerSequenceEntry> FAnimNode_RandomPlayer::Entries

List of sequences to randomly step through


The documentation for this struct was generated from the following files: