1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Register editor classes normally, rather than via ClassDB::set_current_api()

This commit is contained in:
David Snopek
2025-03-13 15:03:36 -05:00
parent 701505eb4f
commit 393465ce92
6 changed files with 31 additions and 66 deletions

View File

@@ -162,12 +162,7 @@ void initialize_gdscript_module(ModuleInitializationLevel p_level) {
gdscript_translation_parser_plugin.instantiate();
EditorTranslationParser::get_singleton()->add_parser(gdscript_translation_parser_plugin, EditorTranslationParser::STANDARD);
} else if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
ClassDB::APIType prev_api = ClassDB::get_current_api();
ClassDB::set_current_api(ClassDB::API_EDITOR);
GDREGISTER_CLASS(GDScriptSyntaxHighlighter);
ClassDB::set_current_api(prev_api);
}
#endif // TOOLS_ENABLED
}