#bevy-plugin #bevy #diagnostics #debugging #gamedev

bevy_screen_diagnostics

Bevy plugin for displaying diagnostics on screen

10 releases (5 breaking)

0.6.0 Jul 6, 2024
0.5.0 Feb 18, 2024
0.4.0 Nov 5, 2023
0.3.0 Jul 13, 2023
0.1.1 Jan 24, 2023

#158 in Game dev

Download history 314/week @ 2024-07-08 489/week @ 2024-07-15 285/week @ 2024-07-22 222/week @ 2024-07-29 178/week @ 2024-08-05 290/week @ 2024-08-12 188/week @ 2024-08-19 210/week @ 2024-08-26 148/week @ 2024-09-02 130/week @ 2024-09-09 129/week @ 2024-09-16 323/week @ 2024-09-23 158/week @ 2024-09-30 281/week @ 2024-10-07 256/week @ 2024-10-14 122/week @ 2024-10-21

836 downloads per month
Used in 2 crates

MIT/Apache

34KB
375 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_startup_system(setup_camera)
        .run();
}

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

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.14 0.6
0.13 0.5
0.12 0.4
0.11 0.3
0.10 0.2
0.9 0.1

Dependencies

~39–77MB
~1.5M SLoC