UAnimInstance::IsUpdatingAnimation
#include "Animation/AnimInstance.h"
Access: public
Specifiers: const
Description
Returns true if the anim instance is currently in the update phase of its animation tick. Useful for assertions or conditional logic that should only execute during the animation update pipeline.
Caveats & Gotchas
- • Only returns true during the update phase window — calling it outside the animation tick always returns false. This is a narrow pipeline-phase check, not a general 'is animation active' query.
- • If you need to know whether the anim instance is actively ticking at all (vs. being LOD'd out or paused), use NeedsUpdate instead.
Signature
bool IsUpdatingAnimation() const Return Type
bool Example
Assert during animation update C++
void UMyAnimInstance::UpdateLocomotionVariables()
{
// Ensure this is only called during the animation update phase
check(IsUpdatingAnimation());
Speed = GetOwningActor()->GetVelocity().Size();
Direction = CalculateDirection(GetOwningActor()->GetVelocity(), GetOwningActor()->GetActorRotation());
} Tags
Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?