From 92ffbceee11d4fbd0d1db65b107f4e559e803038 Mon Sep 17 00:00:00 2001 From: cow-neaz Date: Fri, 17 Jun 2022 03:20:37 +0300 Subject: [PATCH] Stop game on reloading project (cherry picked from commit 8935cf17cf674b0cb027e5c82a21a64d3a43feb1) --- editor/editor_node.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 211cfa7e338..17f335f5376 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1607,6 +1607,10 @@ void EditorNode::save_scene_list(Vector 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();