UAnimInstance::RequestTransitionEvent
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintCallable
Description
Queues a named transition event on the animation state machine. Returns true if the request was successfully queued. Complements the `QueryTransitionEvent` AnimGetter used inside transition rules.
Caveats & Gotchas
- • The event must be consumed via `QueryTransitionEvent` (an AnimGetter node) inside a transition rule condition within the state machine — if no transition rule checks for it, the request silently expires after `RequestTimeout` seconds.
- • Marked BlueprintThreadSafe so it can be called from the worker thread during the parallel update, but the underlying queue uses a mutex; avoid calling it at very high frequency every frame to minimise contention.
Signature
UFUNCTION(BlueprintCallable, Category="Animation", meta = (BlueprintThreadSafe, Keywords = "Event,Request,Transition"))
ENGINE_API bool RequestTransitionEvent(const FName EventName, const double RequestTimeout, const ETransitionRequestQueueMode QueueMode, const ETransitionRequestOverwriteMode OverwriteMode) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| EventName | const FName | The name of the transition event to request, matching the event name used in the state machine transition rules. | — |
| RequestTimeout | const double | How long in seconds the request remains valid before it expires. | — |
| QueueMode | const ETransitionRequestQueueMode | Whether requests accumulate in a queue or replace each other. | — |
| OverwriteMode | const ETransitionRequestOverwriteMode | How an existing request with the same name is handled when a new one arrives. | — |
Return Type
bool Example
Request a jump transition from game code C++
AnimInstance->RequestTransitionEvent(
FName("Jump"),
0.2, // expire after 200ms if not consumed
ETransitionRequestQueueMode::Overwrite,
ETransitionRequestOverwriteMode::UseMostRecent
); Tags
Version History
Introduced in: 5.3
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
| 5.3 | stable | Added in 5.3. |
Feedback
Was this helpful?