Merge pull request #62125 from cow-neaz/stop_game_on_reloading_project

Stop game on reloading project - Fix #62088 issue
This commit is contained in:
Rémi Verschelde 2022-06-17 08:08:20 +02:00 committed by GitHub
commit 362f53ff02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1792,6 +1792,10 @@ void EditorNode::save_scene_list(Vector<String> p_scene_filenames) {
void EditorNode::restart_editor() {
exiting = true;
if (editor_run.get_status() != EditorRun::STATUS_STOP) {
editor_run.stop();
}
String to_reopen;
if (get_tree()->get_edited_scene_root()) {
to_reopen = get_tree()->get_edited_scene_root()->get_scene_file_path();