From 017b7de2df4de8c477b144a00a6fed3104bd259a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 13 Jan 2020 15:02:11 +0100 Subject: [PATCH] EditorNode: Delay addon init to NOTIFICATION_READY Fixes #25635. --- editor/editor_node.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0ea8e044712..6ff00ba84b4 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -369,6 +369,19 @@ void EditorNode::_notification(int p_what) { case NOTIFICATION_READY: { + { + _initializing_addons = true; + Vector addons; + if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) { + addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled"); + } + + for (int i = 0; i < addons.size(); i++) { + set_addon_plugin_enabled(addons[i], true); + } + _initializing_addons = false; + } + VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport_rid(), true); VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport_rid(), true); VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true); @@ -6776,19 +6789,6 @@ EditorNode::EditorNode() { import_dock->initialize_import_options(); - { - _initializing_addons = true; - Vector addons; - if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) { - addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled"); - } - - for (int i = 0; i < addons.size(); i++) { - set_addon_plugin_enabled(addons[i], true); - } - _initializing_addons = false; - } - FileAccess::set_file_close_fail_notify_callback(_file_access_close_error_notify); waiting_for_first_scan = true;