unreal.StateTreeTransitionResult

class unreal.StateTreeTransitionResult(next_active_frames: None = [], current_run_status: StateTreeRunStatus = Ellipsis, source_state: StateTreeStateHandle = [], target_state: StateTreeStateHandle = [], current_state: StateTreeStateHandle = [], change_type: StateTreeStateChangeType = Ellipsis, priority: StateTreeTransitionPriority = 0, source_state_tree: StateTree = Ellipsis, source_root_state: StateTreeStateHandle = [])

Bases: StructBase

Describes a state tree transition. Source is the state where the transition started, Target describes the state where the transition pointed at, and Next describes the selected state. The reason Transition and Next are different is that Transition state can be a selector state, in which case the children will be visited until a leaf state is found, which will be the next state.

C++ Source:

  • Plugin: StateTree

  • Module: StateTreeModule

  • File: StateTreeExecutionTypes.h

Editor Properties: (see get_editor_property/set_editor_property)

  • change_type (StateTreeStateChangeType): [Read-Write] If the change type is Sustained, then the CurrentState was reselected, or if Changed then the state was just activated.

  • current_run_status (StateTreeRunStatus): [Read-Write] Current Run status.

  • current_state (StateTreeStateHandle): [Read-Write] The current state being executed. On enter/exit callbacks this is the state of the task.

  • next_active_frames (Array[StateTreeExecutionFrame]): [Read-Write] States selected as result of the transition.

  • priority (StateTreeTransitionPriority): [Read-Write] Priority of the transition that caused the state change.

  • source_root_state (StateTreeStateHandle): [Read-Write] Root state the execution frame where the transition was requested.

  • source_state (StateTreeStateHandle): [Read-Write] Transition source state

  • source_state_tree (StateTree): [Read-Write] StateTree asset that was active when the transition was requested.

  • target_state (StateTreeStateHandle): [Read-Write] Transition target state

property change_type: StateTreeStateChangeType

[Read-Only] If the change type is Sustained, then the CurrentState was reselected, or if Changed then the state was just activated.

Type:

(StateTreeStateChangeType)

property current_run_status: StateTreeRunStatus

[Read-Only] Current Run status.

Type:

(StateTreeRunStatus)

property current_state: StateTreeStateHandle

[Read-Only] The current state being executed. On enter/exit callbacks this is the state of the task.

Type:

(StateTreeStateHandle)

property next_active_frames: None

[Read-Only] States selected as result of the transition.

Type:

(Array[StateTreeExecutionFrame])

property priority: StateTreeTransitionPriority

[Read-Only] Priority of the transition that caused the state change.

Type:

(StateTreeTransitionPriority)

property source_root_state: StateTreeStateHandle

[Read-Only] Root state the execution frame where the transition was requested.

Type:

(StateTreeStateHandle)

property source_state: StateTreeStateHandle

[Read-Only] Transition source state

Type:

(StateTreeStateHandle)

property source_state_tree: StateTree

[Read-Only] StateTree asset that was active when the transition was requested.

Type:

(StateTree)

property target_state: StateTreeStateHandle

[Read-Only] Transition target state

Type:

(StateTreeStateHandle)