RealDocs

UAnimInstance::SwapCurveWithEvaluationContext

function Engine Since 4.14
#include "Animation/AnimInstance.h"
Access: public

Description

Swaps the instance's internal curve buffer with the one held by the given evaluation context, avoiding a copy when handing curve ownership between the two.

Caveats & Gotchas

  • A swap, not a copy — after the call the context holds whatever curve data the instance previously had, and vice versa, so ordering relative to other curve calls matters.
  • Engine-internal; used by the animation worker thread pipeline, not intended for gameplay code.

Signature

void SwapCurveWithEvaluationContext(FAnimationEvaluationContext& InOutContext)

Parameters

Name Type Description Default
InOutContext FAnimationEvaluationContext& The evaluation context to swap curve data with.

Return Type

void

Example

Swap curves during multi-threaded evaluation C++
void FMyAnimInstanceProxy::Evaluate(FPoseContext& Output)
{
    UAnimInstance* Instance = CastChecked<UAnimInstance>(GetAnimInstanceObject());
    Instance->SwapCurveWithEvaluationContext(EvaluationContext);
}

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.