RealDocs

UAnimInstance::ClearTransitionEvents

function Engine Blueprint Since 5.3
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_APIUFUNCTIONBlueprintCallable

Description

Removes all queued transition requests that match the given event name. Use this to cancel a pending transition if the triggering condition is no longer valid.

Caveats & Gotchas

  • Only clears requests queued via `RequestTransitionEvent`. Requests that have already been consumed or have expired are not affected.
  • BlueprintThreadSafe — safe to call from the animation update thread, but there is a brief window between a request being queued and this call executing where the state machine may have already consumed the event.

Signature

UFUNCTION(BlueprintCallable, Category = "Animation", meta = (BlueprintThreadSafe, Keywords = "Event,Request,Transition"))
ENGINE_API void ClearTransitionEvents(const FName EventName)

Parameters

Name Type Description Default
EventName const FName The name of the transition event whose queued requests should be removed.

Return Type

void

Example

Cancel a queued jump event when the character lands C++
void AMyCharacter::OnLanded(const FHitResult& Hit)
{
    if (UMyAnimInstance* Anim = Cast<UMyAnimInstance>(GetMesh()->GetAnimInstance()))
    {
        Anim->ClearTransitionEvents(FName("Jump"));
    }
}

Version History

Introduced in: 5.3

Version Status Notes
5.6 stable
5.3 stable Added in 5.3.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.