From 1f8790436609be9f43ed74bf38f97f302d0de3e6 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 23 Jul 2021 12:44:35 +0200 Subject: [PATCH] Don't save project on startup in headless or no-window mode (cherry picked from commit ea2489ce937d95f7103332c717c96aeb60d83271) --- editor/editor_node.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f307d463a4b..9c150446c72 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -514,8 +514,10 @@ void EditorNode::_notification(int p_what) { _update_debug_options(); - // Save the project after opening to mark it as last modified. - ProjectSettings::get_singleton()->save(); + // Save the project after opening to mark it as last modified, except in headless mode. + if (OS::get_singleton()->can_draw() && !OS::get_singleton()->is_no_window_mode_enabled()) { + ProjectSettings::get_singleton()->save(); + } /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */ } break;