summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRedworkDE <10944644+RedworkDE@users.noreply.github.com>2023-03-03 10:05:05 +0100
committerYuri Sizov <yuris@humnom.net>2023-03-13 21:56:31 +0100
commit20eeb7c66d3d8b1cb378eed72c93519a451ce450 (patch)
treec3006a6aa788bd0351c93eb1a3e5fe7fc6099e96
parentad6fa1cd25095e65ade1f9a314134e4204691355 (diff)
C#: Get singleton instances using the Core name
(cherry picked from commit 16a2a164feef75b486dfb96d93cd993341a60faf)
-rw-r--r--modules/mono/editor/bindings_generator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index cbe5266f7e..83101c1443 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1483,9 +1483,9 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output << MEMBER_BEGIN "public static GodotObject " CS_PROPERTY_SINGLETON "\n" INDENT1 "{\n"
<< INDENT2 "get\n" INDENT2 "{\n" INDENT3 "if (singleton == null)\n"
- << INDENT4 "singleton = " C_METHOD_ENGINE_GET_SINGLETON "(typeof("
- << itype.proxy_name
- << ").Name);\n" INDENT3 "return singleton;\n" INDENT2 "}\n" INDENT1 "}\n";
+ << INDENT4 "singleton = " C_METHOD_ENGINE_GET_SINGLETON "(\""
+ << itype.name
+ << "\");\n" INDENT3 "return singleton;\n" INDENT2 "}\n" INDENT1 "}\n";
output.append(MEMBER_BEGIN "private static readonly StringName " BINDINGS_NATIVE_NAME_FIELD " = \"");
output.append(itype.name);