You've already forked godot
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user