class_godotsharp.rst 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the GodotSharp.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_GodotSharp:
  6. GodotSharp
  7. ==========
  8. **Inherits:** :ref:`Object<class_Object>`
  9. Bridge between Godot and the Mono runtime (Mono-enabled builds only).
  10. Description
  11. -----------
  12. 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.
  13. See also :ref:`CSharpScript<class_CSharpScript>`.
  14. Methods
  15. -------
  16. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`attach_thread<class_GodotSharp_method_attach_thread>` **(** **)** |
  18. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`detach_thread<class_GodotSharp_method_detach_thread>` **(** **)** |
  20. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_domain_id<class_GodotSharp_method_get_domain_id>` **(** **)** |
  22. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_scripts_domain_id<class_GodotSharp_method_get_scripts_domain_id>` **(** **)** |
  24. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_domain_finalizing_for_unload<class_GodotSharp_method_is_domain_finalizing_for_unload>` **(** :ref:`int<class_int>` domain_id **)** |
  26. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`is_runtime_initialized<class_GodotSharp_method_is_runtime_initialized>` **(** **)** |
  28. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`is_runtime_shutting_down<class_GodotSharp_method_is_runtime_shutting_down>` **(** **)** |
  30. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`is_scripts_domain_loaded<class_GodotSharp_method_is_scripts_domain_loaded>` **(** **)** |
  32. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  33. Method Descriptions
  34. -------------------
  35. .. _class_GodotSharp_method_attach_thread:
  36. - void **attach_thread** **(** **)**
  37. Attaches the current thread to the Mono runtime.
  38. ----
  39. .. _class_GodotSharp_method_detach_thread:
  40. - void **detach_thread** **(** **)**
  41. Detaches the current thread from the Mono runtime.
  42. ----
  43. .. _class_GodotSharp_method_get_domain_id:
  44. - :ref:`int<class_int>` **get_domain_id** **(** **)**
  45. Returns the current MonoDomain ID.
  46. **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized<class_GodotSharp_method_is_runtime_initialized>` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash.
  47. ----
  48. .. _class_GodotSharp_method_get_scripts_domain_id:
  49. - :ref:`int<class_int>` **get_scripts_domain_id** **(** **)**
  50. Returns the scripts MonoDomain's ID. This will be the same MonoDomain ID as :ref:`get_domain_id<class_GodotSharp_method_get_domain_id>`, unless the scripts domain isn't loaded.
  51. **Note:** The Mono runtime must be initialized for this method to work (use :ref:`is_runtime_initialized<class_GodotSharp_method_is_runtime_initialized>` to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash.
  52. ----
  53. .. _class_GodotSharp_method_is_domain_finalizing_for_unload:
  54. - :ref:`bool<class_bool>` **is_domain_finalizing_for_unload** **(** :ref:`int<class_int>` domain_id **)**
  55. Returns ``true`` if the domain is being finalized, ``false`` otherwise.
  56. ----
  57. .. _class_GodotSharp_method_is_runtime_initialized:
  58. - :ref:`bool<class_bool>` **is_runtime_initialized** **(** **)**
  59. Returns ``true`` if the Mono runtime is initialized, ``false`` otherwise.
  60. ----
  61. .. _class_GodotSharp_method_is_runtime_shutting_down:
  62. - :ref:`bool<class_bool>` **is_runtime_shutting_down** **(** **)**
  63. Returns ``true`` if the Mono runtime is shutting down, ``false`` otherwise.
  64. ----
  65. .. _class_GodotSharp_method_is_scripts_domain_loaded:
  66. - :ref:`bool<class_bool>` **is_scripts_domain_loaded** **(** **)**
  67. Returns ``true`` if the scripts domain is loaded, ``false`` otherwise.
  68. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  69. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  70. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`