From a1f454fee353fadbdb6f7032b6458f92be46560c Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Thu, 2 Feb 2023 00:54:16 +0100 Subject: C#: Add global class support Co-authored-by: willnationsdev --- modules/mono/mono_gd/gd_mono.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modules/mono/mono_gd/gd_mono.h') diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h index 080b2c4669..04c375059d 100644 --- a/modules/mono/mono_gd/gd_mono.h +++ b/modules/mono/mono_gd/gd_mono.h @@ -59,8 +59,9 @@ struct PluginCallbacks { } // namespace gdmono class GDMono { - bool runtime_initialized; - bool finalizing_scripts_domain; + bool initialized = false; + bool runtime_initialized = false; + bool finalizing_scripts_domain = false; void *hostfxr_dll_handle = nullptr; bool is_native_aot = false; @@ -72,9 +73,9 @@ class GDMono { bool _load_project_assembly(); #endif - uint64_t api_core_hash; + uint64_t api_core_hash = 0; #ifdef TOOLS_ENABLED - uint64_t api_editor_hash; + uint64_t api_editor_hash = 0; #endif void _init_godot_api_hashes(); @@ -119,6 +120,9 @@ public: return singleton; } + _FORCE_INLINE_ bool is_initialized() const { + return initialized; + } _FORCE_INLINE_ bool is_runtime_initialized() const { return runtime_initialized; } -- cgit v1.2.3