Stop game on reloading project

(cherry picked from commit 8935cf17cf)
This commit is contained in:
cow-neaz 2022-06-17 03:20:37 +03:00 committed by Rémi Verschelde
parent 1b648ddc2b
commit 92ffbceee1

View file

@ -1607,6 +1607,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_filename();