:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.6/modules/mono/doc_classes/GodotSharp.xml. .. _class_GodotSharp: GodotSharp ========== **Inherits:** :ref:`Object` Bridge between Godot and the Mono runtime (Mono-enabled builds only). .. rst-class:: classref-introduction-group Description ----------- This class is a bridge between Godot and the Mono runtime. It exposes several low-level operations and is only available in Mono-enabled Godot builds. See also :ref:`CSharpScript`. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`attach_thread` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`detach_thread` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_domain_id` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_scripts_domain_id` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_domain_finalizing_for_unload` **(** :ref:`int` domain_id **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_runtime_shutting_down` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_scripts_domain_loaded` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GodotSharp_method_attach_thread: .. rst-class:: classref-method void **attach_thread** **(** **)** Attaches the current thread to the Mono runtime. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_detach_thread: .. rst-class:: classref-method void **detach_thread** **(** **)** Detaches the current thread from the Mono runtime. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_get_domain_id: .. rst-class:: classref-method :ref:`int` **get_domain_id** **(** **)** Returns the current MonoDomain ID. \ **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_get_scripts_domain_id: .. rst-class:: classref-method :ref:`int` **get_scripts_domain_id** **(** **)** Returns the scripts MonoDomain's ID. This will be the same MonoDomain ID as :ref:`get_domain_id`, unless the scripts domain isn't loaded. \ **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_is_domain_finalizing_for_unload: .. rst-class:: classref-method :ref:`bool` **is_domain_finalizing_for_unload** **(** :ref:`int` domain_id **)** Returns ``true`` if the domain is being finalized, ``false`` otherwise. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_is_runtime_initialized: .. rst-class:: classref-method :ref:`bool` **is_runtime_initialized** **(** **)** Returns ``true`` if the Mono runtime is initialized, ``false`` otherwise. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_is_runtime_shutting_down: .. rst-class:: classref-method :ref:`bool` **is_runtime_shutting_down** **(** **)** Returns ``true`` if the Mono runtime is shutting down, ``false`` otherwise. .. rst-class:: classref-item-separator ---- .. _class_GodotSharp_method_is_scripts_domain_loaded: .. rst-class:: classref-method :ref:`bool` **is_scripts_domain_loaded** **(** **)** Returns ``true`` if the scripts domain is loaded, ``false`` otherwise. .. |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.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`