UAnimInstance::ParallelEvaluateAnimation
#include "Animation/AnimInstance.h"
Access: public
Specifiers: virtualENGINE_API
Description
Called on a worker thread to evaluate the animation graph when ParallelCanEvaluate returns true. Override to implement fully thread-safe custom animation evaluation; all output is written into the provided out-parameters rather than applied directly to the mesh.
Caveats & Gotchas
- • This function executes on a worker thread — accessing any non-thread-safe UObject or engine state will cause undefined behaviour. All input data must be pre-copied in NativeThreadSafeUpdateAnimation before this is called.
- • The base class implementation runs the standard anim graph. If you override this without calling Super, the full anim graph (including linked instances and sub-graphs) will not run, which may silently discard Blueprint-authored logic.
Signature
ENGINE_API virtual void ParallelEvaluateAnimation(bool bForceRefPose, const USkeletalMesh* InSkeletalMesh, TArray<FTransform>& OutBoneSpaceTransforms, FBlendedHeapCurve& OutCurve, FCompactPose& OutPose); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bForceRefPose | bool | When true, skip the animation graph and output the reference pose directly. | — |
| InSkeletalMesh | const USkeletalMesh* | The skeletal mesh being evaluated. | — |
| OutBoneSpaceTransforms | TArray<FTransform>& | Output array of local-space bone transforms. | — |
| OutCurve | FBlendedHeapCurve& | Output blend curve data for morph targets and material parameters. | — |
| OutPose | FCompactPose& | Output compact pose populated during evaluation. | — |
Return Type
void Example
Override for a fully procedural thread-safe AnimInstance C++
void UMyAnimInstance::ParallelEvaluateAnimation(
bool bForceRefPose,
const USkeletalMesh* InSkeletalMesh,
TArray<FTransform>& OutBoneSpaceTransforms,
FBlendedHeapCurve& OutCurve,
FCompactPose& OutPose)
{
if (bForceRefPose)
{
Super::ParallelEvaluateAnimation(bForceRefPose, InSkeletalMesh, OutBoneSpaceTransforms, OutCurve, OutPose);
return;
}
// Apply procedural bone transforms from thread-safe cached data
ApplyProceduralPose(OutPose);
} See Also
Tags
Version History
Introduced in: 4.9
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?