diff --git a/crates/editor_ui/src/menu_toolbars.rs b/crates/editor_ui/src/menu_toolbars.rs index 87542c44..f6a68e38 100644 --- a/crates/editor_ui/src/menu_toolbars.rs +++ b/crates/editor_ui/src/menu_toolbars.rs @@ -40,7 +40,7 @@ impl Plugin for BottomMenuPlugin { bottom_menu .before(EditorLoadSet) .in_set(EditorSet::Editor) - .run_if(in_state(EditorState::Editor).and_then(in_state(ShowEditorUi::Show))), + .run_if(in_state(ShowEditorUi::Show)), ); app.add_systems( Update, diff --git a/crates/editor_ui/src/ui_plugin.rs b/crates/editor_ui/src/ui_plugin.rs index 0a8ad348..abb3d475 100644 --- a/crates/editor_ui/src/ui_plugin.rs +++ b/crates/editor_ui/src/ui_plugin.rs @@ -133,10 +133,7 @@ impl Plugin for EditorUiCore { .run_if(has_window_changed) .in_set(UiSystemSet), ); - app.add_systems( - Update, - reset_camera_viewport.run_if(in_state(EditorState::Game)), - ); + app.add_systems(OnEnter(ShowEditorUi::Hide), reset_camera_viewport); app.editor_tab_by_trait(EditorTabName::GameView, GameViewTab::default());