unreal.BTTask_RunBehavior

class unreal.BTTask_RunBehavior(outer: Object | None = None, name: Name | str = 'None')

Bases: BTTaskNode

RunBehavior task allows pushing subtrees on execution stack. Subtree asset can’t be changed in runtime!

This limitation is caused by support for subtree’s root level decorators, which are injected into parent tree, and structure of running tree cannot be modified in runtime (see: BTNode: ExecutionIndex, MemoryOffset)

Use RunBehaviorDynamic task for subtrees that need to be changed in runtime.

C++ Source:

  • Module: AIModule

  • File: BTTask_RunBehavior.h

Editor Properties: (see get_editor_property/set_editor_property)

  • behavior_asset (BehaviorTree): [Read-Write] behavior to run

  • ignore_restart_self (bool): [Read-Write] if set, task search will be discarded when this task is selected to execute but is already running

  • node_name (str): [Read-Write] node name

property behavior_asset: BehaviorTree

[Read-Only] behavior to run

Type:

(BehaviorTree)