use bevy::{prelude::*, window::PrimaryWindow}; use bevy_debug_text_overlay::{screen_print, OverlayPlugin}; fn main() { App::new() .add_plugins(DefaultPlugins) // !!!!IMPORTANT!!!! Add the OverlayPlugin here .add_plugins(OverlayPlugin { font_size: 23.0, ..default() }) .add_systems(Startup, setup) .add_systems(Update, (screen_print_text, show_fps, show_cursor_position)) .run(); } #[derive(Debug)] struct ForShow { field_1: f64, field_2: &'static str, field_3: Vec, } fn setup(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); } fn screen_print_text(time: Res