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

Merge pull request #22323 from williamd1k0/ignore-main-scene

Editor: Skip loading main scene if restore_scenes_on_load is used
This commit is contained in:
Rémi Verschelde
2018-12-07 15:08:34 +01:00
committed by GitHub
3 changed files with 24 additions and 3 deletions

View File

@@ -1697,9 +1697,11 @@ bool Main::start() {
#ifdef TOOLS_ENABLED
if (editor) {
Error serr = editor_node->load_scene(local_game_path);
if (serr != OK)
ERR_PRINT("Failed to load scene");
if (game_path != GLOBAL_GET("application/run/main_scene") || !editor_node->has_scenes_in_session()) {
Error serr = editor_node->load_scene(local_game_path);
if (serr != OK)
ERR_PRINT("Failed to load scene");
}
OS::get_singleton()->set_context(OS::CONTEXT_EDITOR);
}
#endif