2024-08-03 11:14:31 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name= "BTInstance" inherits= "RefCounted" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../../../doc/class.xsd" >
<brief_description >
2024-08-03 12:39:27 +00:00
Represents a runtime instance of a [BehaviorTree] resource.
2024-08-03 11:14:31 +00:00
</brief_description>
<description >
2024-08-03 12:39:27 +00:00
Can be created using the [method BehaviorTree.instantiate] method.
2024-08-03 11:14:31 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_last_status" qualifiers= "const" >
<return type= "int" enum= "BT.Status" />
<description >
Returns the execution status of the last update.
</description>
</method>
<method name= "get_owner_node" qualifiers= "const" >
<return type= "Node" />
<description >
Returns the scene [Node] that owns this behavior tree instance.
</description>
</method>
<method name= "get_root_task" qualifiers= "const" >
<return type= "BTTask" />
<description >
Returns the root task of the behavior tree instance.
</description>
</method>
<method name= "get_source_bt_path" qualifiers= "const" >
<return type= "String" />
<description >
Returns the file path to the behavior tree resource that was used to create this instance.
</description>
</method>
<method name= "register_with_debugger" >
<return type= "void" />
<description >
Registers the behavior tree instance with the debugger.
</description>
</method>
<method name= "unregister_with_debugger" >
<return type= "void" />
<description >
2024-08-03 12:39:27 +00:00
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.
2024-08-03 11:14:31 +00:00
</description>
</method>
<method name= "update" >
<return type= "int" enum= "BT.Status" />
<param index= "0" name= "delta" type= "float" />
<description >
Ticks the behavior tree instance and returns its status.
</description>
</method>
</methods>
<members >
<member name= "monitor_performance" type= "bool" setter= "set_monitor_performance" getter= "get_monitor_performance" default= "false" >
If [code]true[/code], adds a performance monitor for this instance to "Debugger-> Monitors" in the editor.
</member>
</members>
<signals >
<signal name= "freed" >
<description >
Emitted when the behavior tree instance is freed. Used by debugger to unregister.
</description>
</signal>
<signal name= "updated" >
<param index= "0" name= "status" type= "int" />
<description >
Emitted when the behavior tree instance has finished updating.
</description>
</signal>
</signals>
</class>