#diagnostics #debugging #bevy #gamedev

bevy_screen_diagnostics

Bevy plugin for displaying diagnostics on screen

12 releases (7 breaking)

Uses new Rust 2024

new 0.8.1 Apr 26, 2025
0.7.0 Apr 22, 2025
0.6.0 Jul 6, 2024
0.5.0 Feb 18, 2024
0.2.3 Mar 6, 2023

#126 in Game dev

Download history 103/week @ 2025-01-08 229/week @ 2025-01-15 196/week @ 2025-01-22 143/week @ 2025-01-29 224/week @ 2025-02-05 252/week @ 2025-02-12 145/week @ 2025-02-19 294/week @ 2025-02-26 254/week @ 2025-03-05 352/week @ 2025-03-12 148/week @ 2025-03-19 189/week @ 2025-03-26 39/week @ 2025-04-02 124/week @ 2025-04-09 151/week @ 2025-04-16 561/week @ 2025-04-23

887 downloads per month
Used in game_tookit

MIT/Apache

39KB
418 lines

bevy_screen_diagnostics

Display bevy diagnostics on the window without any hassle.

What this can do:

  • easy frame and entity dignostics
  • add custom diagnostics
  • change display of diagnostics on the fly
  • toggle diagnostics easily

see the examples on how to do this.

Quickstart

This adds the framerate and frametime diagnostics to your window.

use bevy::prelude::*;

use bevy_screen_diagnostics::{ScreenDiagnosticsPlugin, ScreenFrameDiagnosticsPlugin};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(ScreenDiagnosticsPlugin::default())
        .add_plugins(ScreenFrameDiagnosticsPlugin)
        .add_systems(Startup, setup_camera)
        .run();
}

fn setup_camera(mut commands: Commands) {
    commands.spawn(Camera2d);
}

The ScreenFrameDiagnosticsPlugin is a very simple plugin

Plugins

bevy_screen_diagnostics provides the following bevy plugins:

Font

This crate uses bevy's default font (a stripped version of FiraCode) through the builtin-font default feature. You can provide your own font while initialising the ScreenDiagnosticsPlugin by passing it a asset file path.

compatible bevy versions

bevy bevy_screen_diagnostics
0.16 0.8.1
0.15 0.7
0.14 0.6
0.13 0.5
0.12 0.4
0.11 0.3
0.10 0.2
0.9 0.1

Dependencies

~58–91MB
~1.5M SLoC