diff --git a/hello-world/src/ui.rs b/hello-world/src/ui.rs index 97c6729..89c20a6 100644 --- a/hello-world/src/ui.rs +++ b/hello-world/src/ui.rs @@ -1,10 +1,15 @@ -use bevy::prelude::*; +use bevy::{ + diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin}, + prelude::*, +}; pub struct UiLayerPlugin; impl Plugin for UiLayerPlugin { fn build(&self, app: &mut App) { - app.add_systems(Startup, layout).add_systems(Update, update); + app.add_plugins(FrameTimeDiagnosticsPlugin) + .add_systems(Startup, layout) + .add_systems(Update, update); } } @@ -42,9 +47,19 @@ fn layout(mut cmd: Commands) { }); } -fn update(time: Res