unreal.StateTreeTransitionResult

class unreal.StateTreeTransitionResult(current_active_states: StateTreeActiveStates = [], current_run_status: StateTreeRunStatus = Ellipsis, source_state: StateTreeStateHandle = [], target_state: StateTreeStateHandle = [], next_active_states: StateTreeActiveStates = [], current_state: StateTreeStateHandle = [], change_type: StateTreeStateChangeType = Ellipsis, priority: StateTreeTransitionPriority = 0)

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: StateTreeTypes.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_active_states (StateTreeActiveStates): [Read-Write] Current active states, where the transition started.

  • 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_states (StateTreeActiveStates): [Read-Write] States selected as result of the transition.

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

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

  • 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_active_states: StateTreeActiveStates

[Read-Only] Current active states, where the transition started.

Type:

(StateTreeActiveStates)

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_states: StateTreeActiveStates

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

Type:

(StateTreeActiveStates)

property priority: StateTreeTransitionPriority

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

Type:

(StateTreeTransitionPriority)

property source_state: StateTreeStateHandle

[Read-Only] Transition source state

Type:

(StateTreeStateHandle)

property target_state: StateTreeStateHandle

[Read-Only] Transition target state

Type:

(StateTreeStateHandle)