Navigation
API > API/Plugins > API/Plugins/StateTreeModule > API/Plugins/StateTreeModule/TStateTreeStrongExecutionContext
Description
Requests transition to a state. If called during transition processing (e.g. from FStateTreeTaskBase::TriggerTransitions()) the transition is attempted to be activated immediately (it can fail e.g. because of preconditions on a target state). If called outside the transition handling, the request is buffered and handled at the beginning of next transition processing.
| Name | RequestTransition |
| Type | function |
| Header File | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeAsyncExecutionContext.h |
| Include Path | #include "StateTreeAsyncExecutionContext.h" |
| Source | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Private/StateTreeAsyncExecutionContext.cpp |
template<bool bWriteAccess, std::enable_if_t<(bWriteAccess), int >>
bool RequestTransition
(
FStateTreeStateHandle TargetState,
EStateTreeTransitionPriority Priority,
EStateTreeSelectionFallback Fallback
) const
false if the context is not valid or doesn't have a valid frame anymore or the request failed.
Parameters
| Name | Remarks |
|---|---|
| TargetState | The state to transition to. |
| Priority | The priority of the transition. |
| Fallback | of the transition if it fails to select the target state. |