diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index ca1b03392a..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 @@ -1992,6 +1997,8 @@ void Main::cleanup() { memdelete(arvr_server); } + ImageLoader::cleanup(); + unregister_driver_types(); unregister_module_types(); unregister_platform_apis(); |