You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
C#: Get singleton instances using the Core name
This commit is contained in:
@@ -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"
|
output << MEMBER_BEGIN "public static GodotObject " CS_PROPERTY_SINGLETON "\n" INDENT1 "{\n"
|
||||||
<< INDENT2 "get\n" INDENT2 "{\n" INDENT3 "if (singleton == null)\n"
|
<< INDENT2 "get\n" INDENT2 "{\n" INDENT3 "if (singleton == null)\n"
|
||||||
<< INDENT4 "singleton = " C_METHOD_ENGINE_GET_SINGLETON "(typeof("
|
<< INDENT4 "singleton = " C_METHOD_ENGINE_GET_SINGLETON "(\""
|
||||||
<< itype.proxy_name
|
<< itype.name
|
||||||
<< ").Name);\n" INDENT3 "return singleton;\n" INDENT2 "}\n" INDENT1 "}\n";
|
<< "\");\n" INDENT3 "return singleton;\n" INDENT2 "}\n" INDENT1 "}\n";
|
||||||
|
|
||||||
output.append(MEMBER_BEGIN "private static readonly StringName " BINDINGS_NATIVE_NAME_FIELD " = \"");
|
output.append(MEMBER_BEGIN "private static readonly StringName " BINDINGS_NATIVE_NAME_FIELD " = \"");
|
||||||
output.append(itype.name);
|
output.append(itype.name);
|
||||||
|
|||||||
Reference in New Issue
Block a user