mirror of
https://github.com/godotengine/godot
synced 2024-09-05 14:59:59 +00:00
Fix API hash related crash in EditorSettings
This commit is contained in:
parent
3fa8fad26b
commit
e2a91309d0
|
@ -481,6 +481,8 @@ void DocTools::generate(bool p_basic_types) {
|
|||
default_value_valid = true;
|
||||
}
|
||||
}
|
||||
} else if (name == "EditorSettings") {
|
||||
// Special case for editor settings, to prevent hardware or OS specific settings to affect the result.
|
||||
} else if (import_option) {
|
||||
default_value = import_options_default[E.name];
|
||||
default_value_valid = true;
|
||||
|
|
|
@ -6822,7 +6822,6 @@ EditorNode::EditorNode() {
|
|||
// No scripting by default if in editor.
|
||||
ScriptServer::set_scripting_enabled(false);
|
||||
|
||||
EditorSettings::ensure_class_registered();
|
||||
EditorHelp::generate_doc();
|
||||
SceneState::set_disable_placeholders(true);
|
||||
ResourceLoader::clear_translation_remaps(); // Using no remaps if in editor.
|
||||
|
|
|
@ -878,13 +878,6 @@ EditorSettings *EditorSettings::get_singleton() {
|
|||
return singleton.ptr();
|
||||
}
|
||||
|
||||
void EditorSettings::ensure_class_registered() {
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
GDREGISTER_CLASS(EditorSettings); // Otherwise it can't be unserialized.
|
||||
ClassDB::set_current_api(prev_api);
|
||||
}
|
||||
|
||||
void EditorSettings::create() {
|
||||
// IMPORTANT: create() *must* create a valid EditorSettings singleton,
|
||||
// as the rest of the engine code will assume it. As such, it should never
|
||||
|
@ -895,8 +888,6 @@ void EditorSettings::create() {
|
|||
return;
|
||||
}
|
||||
|
||||
ensure_class_registered();
|
||||
|
||||
String config_file_path;
|
||||
Ref<ConfigFile> extra_config = memnew(ConfigFile);
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ public:
|
|||
|
||||
static EditorSettings *get_singleton();
|
||||
|
||||
static void ensure_class_registered();
|
||||
static void create();
|
||||
void setup_language();
|
||||
void setup_network();
|
||||
|
|
|
@ -140,7 +140,7 @@ void register_editor_types() {
|
|||
GDREGISTER_CLASS(EditorScript);
|
||||
GDREGISTER_CLASS(EditorSelection);
|
||||
GDREGISTER_CLASS(EditorFileDialog);
|
||||
GDREGISTER_ABSTRACT_CLASS(EditorSettings);
|
||||
GDREGISTER_CLASS(EditorSettings);
|
||||
GDREGISTER_CLASS(EditorNode3DGizmo);
|
||||
GDREGISTER_CLASS(EditorNode3DGizmoPlugin);
|
||||
GDREGISTER_ABSTRACT_CLASS(EditorResourcePreview);
|
||||
|
|
Loading…
Reference in a new issue