summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp8
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