Skip to content

Commit

Permalink
Merge pull request #52344 from TechnoPorg/import-assets-first
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Sep 15, 2021
2 parents f61edeb + 1963c63 commit a2b727e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,19 +615,6 @@ void EditorNode::_notification(int p_what) {
} break;

case NOTIFICATION_READY: {
{
_initializing_addons = true;
Vector<String> 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;
}

RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true);
RenderingServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true);

Expand Down Expand Up @@ -986,6 +973,18 @@ void EditorNode::_sources_changed(bool p_exist) {
load_scene(defer_load_scene);
defer_load_scene = "";
}

// Only enable addons once resources have been imported
_initializing_addons = true;
Vector<String> 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;
}
}

Expand Down

0 comments on commit a2b727e

Please sign in to comment.