<?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>
		Represents a runtime instance of a [BehaviorTree] resource.
	</brief_description>
	<description>
		Can be created using the [method BehaviorTree.instantiate] method.
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="get_agent" qualifiers="const">
			<return type="Node" />
			<description>
				Returns the agent of the behavior tree instance.
			</description>
		</method>
		<method name="get_blackboard" qualifiers="const">
			<return type="Blackboard" />
			<description>
				Returns the blackboard of the behavior tree instance.
			</description>
		</method>
		<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="is_instance_valid" qualifiers="const">
			<return type="bool" />
			<description>
				Returns [code]true[/code] if the behavior tree instance is properly initialized and can be used.
			</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>
				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.
			</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-&gt;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>
