diff --git a/crates/bevy_feathers/src/lib.rs b/crates/bevy_feathers/src/lib.rs index ef70be1844ed0..1a4621d230ab5 100644 --- a/crates/bevy_feathers/src/lib.rs +++ b/crates/bevy_feathers/src/lib.rs @@ -18,10 +18,11 @@ //! Please report issues, submit fixes and propose changes. //! Thanks for stress-testing; let's build something better together. -use bevy_app::{HierarchyPropagatePlugin, Plugin, PostUpdate, Update}; +use bevy_app::{HierarchyPropagatePlugin, Plugin, PostUpdate, PropagateSet}; use bevy_asset::embedded_asset; -use bevy_ecs::query::With; +use bevy_ecs::{query::With, schedule::IntoScheduleConfigs}; use bevy_text::{TextColor, TextFont}; +use bevy_ui::UiSystems; use bevy_ui_render::UiMaterialPlugin; use crate::{ @@ -63,11 +64,18 @@ impl Plugin for FeathersPlugin { app.add_plugins(( ControlsPlugin, CursorIconPlugin, - HierarchyPropagatePlugin::>::new(Update), - HierarchyPropagatePlugin::>::new(Update), + HierarchyPropagatePlugin::>::new(PostUpdate), + HierarchyPropagatePlugin::>::new(PostUpdate), UiMaterialPlugin::::default(), )); + // This needs to run in UiSystems::Propagate so the fonts are up-to-date for `measure_text_system` + // and `detect_text_needs_rerender` in UiSystems::Content + app.configure_sets( + PostUpdate, + PropagateSet::::default().in_set(UiSystems::Propagate), + ); + app.insert_resource(DefaultCursor(EntityCursor::System( bevy_window::SystemCursorIcon::Default, )));