RealDocs

UAnimInstance::QueryTransitionEvent

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

Description

Checks whether any pending transition events match the specified state machine transition without consuming them. Returns true if matching events exist, allowing transition rules to query event state non-destructively.

Caveats & Gotchas

  • This is a read-only query — it does not consume or mark the events. If you need to consume the event so it does not fire again, use QueryAndMarkTransitionEvent instead.
  • The machine and transition indices are internal to the compiled animation blueprint and are not stable across recompilations. Avoid hardcoding these values; use the auto-generated transition rule graph bindings instead.

Signature

UFUNCTION(BlueprintCallable, Category="Animation", meta=(BlueprintThreadSafe, Keywords="Event,Query,Transition"))
ENGINE_API bool QueryTransitionEvent(int32 MachineIndex, int32 TransitionIndex, TArray<int32>& OutSourceTransitionIndices);

Parameters

Name Type Description Default
MachineIndex int32 Index of the state machine to query.
TransitionIndex int32 Index of the specific transition to check for pending events.
OutSourceTransitionIndices TArray<int32>& Output array populated with the indices of source transitions that have matching pending events.

Return Type

bool

Example

Query for a pending transition event in a transition rule C++
bool UMyAnimInstance::CanTransitionToAttack(int32 MachineIndex, int32 TransitionIndex)
{
	TArray<int32> SourceIndices;
	return QueryTransitionEvent(MachineIndex, TransitionIndex, SourceIndices);
}

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.