RealDocs

UAnimInstance::OnUROPreInterpolation_AnyThread

function Engine Since 4.19
#include "Animation/AnimInstance.h"
Access: public Specifiers: virtual

Description

Called on the worker thread before URO (Update Rate Optimization) interpolation is applied. Override to inject custom logic that must execute before the engine interpolates between cached animation frames during skipped ticks.

Caveats & Gotchas

  • Runs on any thread (game thread or worker thread) depending on the URO configuration. All code in this function must be fully thread-safe — no access to game-thread-only subsystems.
  • Only called when URO is active and the current tick is being interpolated rather than fully evaluated. If URO is disabled or the tick is a full evaluation tick, this function is not called.

Signature

virtual void OnUROPreInterpolation_AnyThread(FAnimationEvaluationContext& InOutContext);

Parameters

Name Type Description Default
InOutContext FAnimationEvaluationContext& The evaluation context that will be used for interpolation.

Return Type

void

Example

Snap curve values before interpolation C++
void UMyAnimInstance::OnUROPreInterpolation_AnyThread(FAnimationEvaluationContext& InOutContext)
{
    // Ensure a boolean-like curve is not smoothly interpolated
    // by snapping it to 0 or 1 before URO blending
    Super::OnUROPreInterpolation_AnyThread(InOutContext);
}

Version History

Introduced in: 4.19

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.