diff --git a/editor/editor_main_screen.cpp b/editor/editor_main_screen.cpp index fdd4615c33f6..d6c486c21146 100644 --- a/editor/editor_main_screen.cpp +++ b/editor/editor_main_screen.cpp @@ -233,6 +233,25 @@ EditorPlugin *EditorMainScreen::get_plugin_by_name(const String &p_plugin_name) return main_editor_plugins[p_plugin_name]; } +bool EditorMainScreen::can_auto_switch_screens() const { + if (selected_plugin == nullptr) { + return true; + } + // Only allow auto-switching if the selected button is to the left of the Script button. + for (int i = 0; i < button_hb->get_child_count(); i++) { + Button *button = Object::cast_to