From e57eeb14bc5f4af3c75a6a3d43a28098bf5b839e Mon Sep 17 00:00:00 2001 From: runzh-crypto <1206904210@qq.com> Date: Mon, 7 Apr 2025 00:29:19 +0800 Subject: [PATCH] validate any form of running project --- editor/editor_node.cpp | 5 ----- editor/gui/editor_run_bar.cpp | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ba16a6c1fb5..fd37eca20f7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5702,11 +5702,6 @@ bool EditorNode::ensure_main_scene(bool p_from_native) { return false; } - if (!EditorNode::validate_custom_directory()) { - current_menu_option = -1; - return false; - } - return true; } diff --git a/editor/gui/editor_run_bar.cpp b/editor/gui/editor_run_bar.cpp index 9a1223322fc..789694759b1 100644 --- a/editor/gui/editor_run_bar.cpp +++ b/editor/gui/editor_run_bar.cpp @@ -218,6 +218,10 @@ void EditorRunBar::_run_scene(const String &p_scene_path, const Vector & return; } + if (!EditorNode::get_singleton()->validate_custom_directory()) { + return; + } + _reset_play_buttons(); String write_movie_file;