@@ -730,6 +730,10 @@ void EditorNode::_notification(int p_what) {
730
730
CanvasItemEditor::ThemePreviewMode theme_preview_mode = (CanvasItemEditor::ThemePreviewMode)(int )EditorSettings::get_singleton ()->get_project_metadata (" 2d_editor" , " theme_preview" , CanvasItemEditor::THEME_PREVIEW_PROJECT);
731
731
update_preview_themes (theme_preview_mode);
732
732
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
+
733
737
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
734
738
} break ;
735
739
@@ -1152,9 +1156,15 @@ void EditorNode::_sources_changed(bool p_exist) {
1152
1156
if (!singleton->cmdline_export_mode ) {
1153
1157
EditorResourcePreview::get_singleton ()->start ();
1154
1158
}
1159
+
1160
+ get_tree ()->create_timer (1 .0f )->connect (" timeout" , callable_mp (this , &EditorNode::_remove_lock_file));
1155
1161
}
1156
1162
}
1157
1163
1164
+ void EditorNode::_remove_lock_file () {
1165
+ OS::get_singleton ()->remove_lock_file ();
1166
+ }
1167
+
1158
1168
void EditorNode::_scan_external_changes () {
1159
1169
disk_changed_list->clear ();
1160
1170
TreeItem *r = disk_changed_list->create_item ();
@@ -5382,6 +5392,10 @@ void EditorNode::_save_window_settings_to_config(Ref<ConfigFile> p_layout, const
5382
5392
}
5383
5393
5384
5394
void EditorNode::_load_open_scenes_from_config (Ref<ConfigFile> p_layout) {
5395
+ if (Engine::get_singleton ()->is_recovery_mode_hint ()) {
5396
+ return ;
5397
+ }
5398
+
5385
5399
if (!bool (EDITOR_GET (" interface/scene_tabs/restore_scenes_on_load" ))) {
5386
5400
return ;
5387
5401
}
@@ -6613,7 +6627,9 @@ void EditorNode::_feature_profile_changed() {
6613
6627
6614
6628
editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_3D, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_3D));
6615
6629
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
+ }
6617
6633
if (AssetLibraryEditorPlugin::is_available ()) {
6618
6634
editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_ASSETLIB, !profile->is_feature_disabled (EditorFeatureProfile::FEATURE_ASSET_LIB));
6619
6635
}
@@ -6624,7 +6640,9 @@ void EditorNode::_feature_profile_changed() {
6624
6640
editor_dock_manager->set_dock_enabled (history_dock, true );
6625
6641
editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_3D, true );
6626
6642
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
+ }
6628
6646
if (AssetLibraryEditorPlugin::is_available ()) {
6629
6647
editor_main_screen->set_button_enabled (EditorMainScreen::EDITOR_ASSETLIB, true );
6630
6648
}
@@ -7761,7 +7779,10 @@ EditorNode::EditorNode() {
7761
7779
add_editor_plugin (memnew (CanvasItemEditorPlugin));
7762
7780
add_editor_plugin (memnew (Node3DEditorPlugin));
7763
7781
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
+ }
7765
7786
7766
7787
EditorAudioBuses *audio_bus_editor = EditorAudioBuses::register_editor ();
7767
7788
0 commit comments