@@ -730,6 +730,10 @@ void EditorNode::_notification(int p_what) {
730730 CanvasItemEditor::ThemePreviewMode theme_preview_mode = (CanvasItemEditor::ThemePreviewMode)(int )EditorSettings::get_singleton ()->get_project_metadata (" 2d_editor" , " theme_preview" , CanvasItemEditor::THEME_PREVIEW_PROJECT);
731731 update_preview_themes (theme_preview_mode);
732732
733+ if (Engine::get_singleton ()->is_recovery_mode_hint ()) {
734+ EditorToaster::get_singleton ()->popup_str (TTR (" Recovery Mode is enabled. Editor functionality has been restricted." ), EditorToaster::SEVERITY_WARNING);
735+ }
736+
733737 /* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
734738 } break ;
735739
@@ -1152,9 +1156,15 @@ void EditorNode::_sources_changed(bool p_exist) {
11521156 if (!singleton->cmdline_export_mode ) {
11531157 EditorResourcePreview::get_singleton ()->start ();
11541158 }
1159+
1160+ get_tree ()->create_timer (1 .0f )->connect (" timeout" , callable_mp (this , &EditorNode::_remove_lock_file));
11551161 }
11561162}
11571163
1164+ void EditorNode::_remove_lock_file () {
1165+ OS::get_singleton ()->remove_lock_file ();
1166+ }
1167+
11581168void EditorNode::_scan_external_changes () {
11591169 disk_changed_list->clear ();
11601170 TreeItem *r = disk_changed_list->create_item ();
@@ -5382,6 +5392,10 @@ void EditorNode::_save_window_settings_to_config(Ref<ConfigFile> p_layout, const
53825392}
53835393
53845394void EditorNode::_load_open_scenes_from_config (Ref<ConfigFile> p_layout) {
5395+ if (Engine::get_singleton ()->is_recovery_mode_hint ()) {
5396+ return ;
5397+ }
5398+
53855399 if (!bool (EDITOR_GET (" interface/scene_tabs/restore_scenes_on_load" ))) {
53865400 return ;
53875401 }
@@ -6613,7 +6627,9 @@ void EditorNode::_feature_profile_changed() {
66136627
66146628 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_3D, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_3D));
66156629 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_SCRIPT, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_SCRIPT));
6616- editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_GAME, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_GAME));
6630+ if (!Engine::get_singleton ()->is_recovery_mode_hint ()) {
6631+ editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_GAME, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_GAME));
6632+ }
66176633 if (AssetLibraryEditorPlugin::is_available ()) {
66186634 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_ASSETLIB, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_ASSET_LIB));
66196635 }
@@ -6624,7 +6640,9 @@ void EditorNode::_feature_profile_changed() {
66246640 editor_dock_manager->set_dock_enabled (history_dock, true );
66256641 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_3D, true );
66266642 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_SCRIPT, true );
6627- editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_GAME, true );
6643+ if (!Engine::get_singleton ()->is_recovery_mode_hint ()) {
6644+ editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_GAME, true );
6645+ }
66286646 if (AssetLibraryEditorPlugin::is_available ()) {
66296647 editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_ASSETLIB, true );
66306648 }
@@ -7761,7 +7779,10 @@ EditorNode::EditorNode() {
77617779 add_editor_plugin (memnew (CanvasItemEditorPlugin));
77627780 add_editor_plugin (memnew (Node3DEditorPlugin));
77637781 add_editor_plugin (memnew (ScriptEditorPlugin));
7764- add_editor_plugin (memnew (GameViewPlugin));
7782+
7783+ if (!Engine::get_singleton ()->is_recovery_mode_hint ()) {
7784+ add_editor_plugin (memnew (GameViewPlugin));
7785+ }
77657786
77667787 EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor ();
77677788
0 commit comments