BTInstance

Inherits:

Represents a runtime instance of aBehaviorTree resource.

Description

Can be created using theBehaviorTree.instantiate method.

Properties

bool

monitor_performance

false

Methods

Node

get_agent()const

Blackboard

get_blackboard()const

Status

get_last_status()const

Node

get_owner_node()const

BTTask

get_root_task()const

String

get_source_bt_path()const

bool

is_instance_valid()const

void

register_with_debugger()

void

unregister_with_debugger()

Status

update(delta:float)


Signals

freed()🔗

Emitted when the behavior tree instance is freed. Used by debugger to unregister.


updated(status:int)🔗

Emitted when the behavior tree instance has finished updating.


Property Descriptions

boolmonitor_performance =false🔗

Iftrue, adds a performance monitor for this instance to “Debugger->Monitors” in the editor.


Method Descriptions

Nodeget_agent()const🔗

Returns the agent of the behavior tree instance.


Blackboardget_blackboard()const🔗

Returns the blackboard of the behavior tree instance.


Statusget_last_status()const🔗

Returns the execution status of the last update.


Nodeget_owner_node()const🔗

Returns the sceneNode that owns this behavior tree instance.


BTTaskget_root_task()const🔗

Returns the root task of the behavior tree instance.


Stringget_source_bt_path()const🔗

Returns the file path to the behavior tree resource that was used to create this instance.


boolis_instance_valid()const🔗

Returnstrue if the behavior tree instance is properly initialized and can be used.


voidregister_with_debugger()🔗

Registers the behavior tree instance with the debugger.


voidunregister_with_debugger()🔗

Unregisters the behavior tree instance from the debugger. This is typically not necessary, as the debugger will automatically unregister the instance when it is freed.


Statusupdate(delta:float)🔗

Ticks the behavior tree instance and returns its status.