summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index db23a6c214..7383294167 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1697,12 +1697,17 @@ 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
+ if (!editor) {
+ OS::get_singleton()->set_context(OS::CONTEXT_ENGINE);
+ }
}
if (!project_manager && !editor) { // game