:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/modules/limboai/doc_classes/BTInstance.xml. .. _class_BTInstance: BTInstance ========== **Inherits:** Represents a runtime instance of a :ref:`BehaviorTree` resource. .. rst-class:: classref-introduction-group Description ----------- Can be created using the :ref:`BehaviorTree.instantiate` method. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +----------+---------------------------------------------------------------------------+-----------+ | ``bool`` | :ref:`monitor_performance` | ``false`` | +----------+---------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------+-----------------------------------------------------------------------------------------+ | :ref:`Status` | :ref:`get_last_status`\ (\ ) |const| | +-------------------------------+-----------------------------------------------------------------------------------------+ | ``Node`` | :ref:`get_owner_node`\ (\ ) |const| | +-------------------------------+-----------------------------------------------------------------------------------------+ | :ref:`BTTask` | :ref:`get_root_task`\ (\ ) |const| | +-------------------------------+-----------------------------------------------------------------------------------------+ | ``String`` | :ref:`get_source_bt_path`\ (\ ) |const| | +-------------------------------+-----------------------------------------------------------------------------------------+ | |void| | :ref:`register_with_debugger`\ (\ ) | +-------------------------------+-----------------------------------------------------------------------------------------+ | |void| | :ref:`unregister_with_debugger`\ (\ ) | +-------------------------------+-----------------------------------------------------------------------------------------+ | :ref:`Status` | :ref:`update`\ (\ delta\: ``float``\ ) | +-------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_BTInstance_signal_freed: .. rst-class:: classref-signal **freed**\ (\ ) :ref:`🔗` Emitted when the behavior tree instance is freed. Used by debugger to unregister. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_signal_updated: .. rst-class:: classref-signal **updated**\ (\ status\: ``int``\ ) :ref:`🔗` Emitted when the behavior tree instance has finished updating. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_BTInstance_property_monitor_performance: .. rst-class:: classref-property ``bool`` **monitor_performance** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_monitor_performance**\ (\ value\: ``bool``\ ) - ``bool`` **get_monitor_performance**\ (\ ) If ``true``, adds a performance monitor for this instance to "Debugger->Monitors" in the editor. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_BTInstance_method_get_last_status: .. rst-class:: classref-method :ref:`Status` **get_last_status**\ (\ ) |const| :ref:`🔗` Returns the execution status of the last update. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_get_owner_node: .. rst-class:: classref-method ``Node`` **get_owner_node**\ (\ ) |const| :ref:`🔗` Returns the scene ``Node`` that owns this behavior tree instance. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_get_root_task: .. rst-class:: classref-method :ref:`BTTask` **get_root_task**\ (\ ) |const| :ref:`🔗` Returns the root task of the behavior tree instance. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_get_source_bt_path: .. rst-class:: classref-method ``String`` **get_source_bt_path**\ (\ ) |const| :ref:`🔗` Returns the file path to the behavior tree resource that was used to create this instance. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_register_with_debugger: .. rst-class:: classref-method |void| **register_with_debugger**\ (\ ) :ref:`🔗` Registers the behavior tree instance with the debugger. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_unregister_with_debugger: .. rst-class:: classref-method |void| **unregister_with_debugger**\ (\ ) :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_BTInstance_method_update: .. rst-class:: classref-method :ref:`Status` **update**\ (\ delta\: ``float``\ ) :ref:`🔗` Ticks the behavior tree instance and returns its status. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`