From 669c91bfd0f026108015a98dd585f775b92ae4d1 Mon Sep 17 00:00:00 2001 From: NoNormalDev <190293561+NoNormalDev@users.noreply.github.com> Date: Sat, 16 May 2026 17:51:29 +0200 Subject: [PATCH] Ensure project.godot exists before running the project in the editor --- editor/run/editor_run_bar.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/editor/run/editor_run_bar.cpp b/editor/run/editor_run_bar.cpp index 530555cf0b..1d61bada7b 100644 --- a/editor/run/editor_run_bar.cpp +++ b/editor/run/editor_run_bar.cpp @@ -265,6 +265,18 @@ void EditorRunBar::_run_scene(const String &p_scene_path, const Vector & _reset_play_buttons(); + String resource_path = ProjectSettings::get_singleton()->get_resource_path(); + if (!resource_path.is_empty()) { + String project_file_path = resource_path.path_join("project.godot"); + if (!FileAccess::exists(project_file_path)) { + // TODO: Try to recover the "project.godot" file using ProjectSettings::get_singleton()->save() + EditorNode::get_singleton()->show_warning( + TTRC("Failed to run the project because the project.godot file is missing."), + TTRC("Error!")); + return; + } + } + String write_movie_file; if (is_movie_maker_enabled()) { if (current_mode == RUN_CURRENT) {