diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-07 15:08:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 15:08:34 +0100 |
commit | e4a2003b9860db00452e4a65f8cc55d7f525c463 (patch) | |
tree | 2924f8a589cb1d6ff484fa65e54ac6e3063b124b /main | |
parent | 6343d05d9b812ef0fa4388ff796077b15bb39f0d (diff) | |
parent | 62218ea41b785378176334bb9a6eef79d7286441 (diff) |
Merge pull request #22323 from williamd1k0/ignore-main-scene
Editor: Skip loading main scene if restore_scenes_on_load is used
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index db23a6c214..6a786e9cb5 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -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 |