RealDocs

UAnimInstance::NeedsUpdate

function Engine Since 4.11
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_API

Description

Returns whether this anim instance requires an update this frame. False when the instance has been marked to skip updates, typically due to Update Rate Optimizations (URO) determining the mesh is off-screen or at a distance where reduced update frequency is acceptable.

Caveats & Gotchas

  • A false return does not mean the mesh is invisible — URO may still render using the last evaluated pose while skipping the animation update. Gameplay logic that depends on up-to-date animation state should check this flag to avoid acting on stale data.
  • Montage events, notifies, and curve values are not updated on skipped frames. Systems that consume these outputs must handle gaps gracefully or force the anim instance to update via the skeletal mesh component's VisibilityBasedAnimTickOption.

Signature

ENGINE_API bool NeedsUpdate() const;

Return Type

bool

Example

Skip expensive gameplay sync when anim is not updating C++
void AMyCharacter::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	UAnimInstance* AnimInstance = GetMesh()->GetAnimInstance();
	if (AnimInstance && AnimInstance->NeedsUpdate())
	{
		// Only sync IK targets when animation is actually updating
		SyncFootIKTargets();
	}
}

Version History

Introduced in: 4.11

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.