Navigation
API > API/Plugins > API/Plugins/StateTreeModule
Runtime representation of a StateTree state.
| Name | FCompactStateTreeState |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeTypes.h |
| Include Path | #include "StateTreeTypes.h" |
Syntax
USTRUCT ()
struct FCompactStateTreeState
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCachedRequestTick | uint8 | True if any state tasks request a tick every frame. | StateTreeTypes.h | |
| bCachedRequestTickOnlyOnEvents | uint8 | True if any state tasks request a tick every frame but only if there are events. | StateTreeTypes.h | |
| bCheckPrerequisitesWhenActivatingChildDirectly | uint8 | Should state's required event and enter conditions be evaluated when transition leads directly to it's child. | StateTreeTypes.h | |
| bConsumeEventOnSelect | uint8 | If set to true, the required event is consumed (later state selection cannot react to it) if state selection can be made. | StateTreeTypes.h | |
| bEnabled | uint8 | True if the state is Enabled (i.e. not explicitly marked as disabled). | StateTreeTypes.h | |
| bHasCompletedTriggerTransitions | uint8 | True if the state contains transitions with completed trigger. | StateTreeTypes.h | |
| bHasCustomTickRate | uint8 | If set to true, the state has a custom tick rate. | StateTreeTypes.h | |
| bHasDelegateTriggerTransitions | uint8 | True if the state contains transitions with delegate trigger. | StateTreeTypes.h | |
| bHasEventTriggerTransitions | uint8 | True if the state contains transitions with event trigger. | StateTreeTypes.h | |
| bHasFailedTriggerTransitions | uint8 | True if the state contains transitions with Succeeded trigger. | StateTreeTypes.h | |
| bHasStateChangeConditions | uint8 | True if the state contains conditions which require call to enter/completed/exit state. | StateTreeTypes.h | |
| bHasSucceededTriggerTransitions | uint8 | True if the state contains transitions with Succeeded trigger. | StateTreeTypes.h | |
| bHasTickTasks | uint8 | True if any task has bShouldCallTick. | StateTreeTypes.h | |
| bHasTickTasksOnlyOnEvents | uint8 | True if any task has bShouldCallTickOnlyOnEvents. No effect if bHasTickTasks is true. | StateTreeTypes.h | |
| bHasTickTriggerTransitions | uint8 | True if the state contains transitions with tick trigger. | StateTreeTypes.h | |
| bHasTransitionTasks | uint8 | True if the state contains tasks that should be called during transition handling. | StateTreeTypes.h | |
| ChildrenBegin | uint16 | Index to first child state | StateTreeTypes.h | |
| ChildrenEnd | uint16 | Index one past the last child state. | StateTreeTypes.h | |
| CompletionTasksControl | EStateTreeTaskCompletionType | How the tasks control the completion of the state. | StateTreeTypes.h | |
| CompletionTasksMask | uint32 | Mask used to test the tasks completion. | StateTreeTypes.h | |
| CompletionTasksMaskBitsOffset | uint8 | Offset, in bits, of the first flag inside the mask. | StateTreeTypes.h | |
| CompletionTasksMaskBufferIndex | uint8 | Index in the mask buffer used by the state. | StateTreeTypes.h | |
| CustomTickRate | float | Tick rate in seconds the state tasks and transitions should tick If set the state cannot sleep. | StateTreeTypes.h | |
| Depth | uint8 | Distance to root state. | StateTreeTypes.h | |
| EnabledTasksNum | uint8 | Number of enabled tasks todo: this should be removed once we finished only compiling enabled elements for StateTree Compiler | StateTreeTypes.h | |
| EnterConditionsBegin | uint16 | Index to first state enter condition | StateTreeTypes.h | |
| EnterConditionsNum | uint8 | Number of enter conditions | StateTreeTypes.h | |
| EventDataIndex | FStateTreeIndex16 | StateTreeTypes.h | ||
| InstanceDataNum | uint8 | Number of instance data | StateTreeTypes.h | |
| LinkedAsset | TObjectPtr< UStateTree > | StateTreeTypes.h | ||
| LinkedState | FStateTreeStateHandle | Linked state handle if the state type is linked state. | StateTreeTypes.h | |
| Name | FName | Name of the State | StateTreeTypes.h | |
| ParameterBindingsBatch | FStateTreeIndex16 | StateTreeTypes.h | ||
| ParameterDataHandle | FStateTreeDataHandle | StateTreeTypes.h | ||
| ParameterTemplateIndex | FStateTreeIndex16 | Index to state instance data. | StateTreeTypes.h | |
| Parent | FStateTreeStateHandle | Parent state handle, invalid if root state. | StateTreeTypes.h | |
| RequiredEventToEnter | FCompactEventDesc | Description of an event required to enter the state. | StateTreeTypes.h | |
| SelectionBehavior | EStateTreeStateSelectionBehavior | What to do when the state is considered for selection. | StateTreeTypes.h | |
| Tag | FGameplayTag | GameplayTag describing the State | StateTreeTypes.h | |
| TasksBegin | uint16 | Index to first task | StateTreeTypes.h | |
| TasksNum | uint8 | Number of tasks | StateTreeTypes.h | |
| TransitionsBegin | uint16 | Index to first transition | StateTreeTypes.h | |
| TransitionsNum | uint8 | Number of transitions | StateTreeTypes.h | |
| Type | EStateTreeStateType | Type of the state | StateTreeTypes.h | |
| UtilityConsiderationsBegin | uint16 | Index to first state utility consideration | StateTreeTypes.h | |
| UtilityConsiderationsNum | uint8 | Number of utility considerations | StateTreeTypes.h | |
| Weight | float | Weight used to scale the normalized final utility score for this state | StateTreeTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoesRequestTickTasks
(
bool bHasEvent |
StateTreeTypes.h | ||
uint16 GetNextSibling() |
StateTreeTypes.h | ||
bool HasChildren() |
StateTreeTypes.h | ||
bool ShouldTickCompletionTransitions
(
bool bSucceeded, |
A state can complete with Stopped, Succeeded, and Failed. | StateTreeTypes.h | |
bool ShouldTickTasks
(
bool bHasEvent |
StateTreeTypes.h | ||
bool ShouldTickTransitions
(
bool bHasEvent, |
StateTreeTypes.h |