bevy_screen_diagnostics

Crates.iobevy_screen_diagnostics
lib.rsbevy_screen_diagnostics
version0.8.1
created_at2023-01-24 23:39:09.37827+00
updated_at2025-04-26 22:24:02.551786+00
descriptionBevy plugin for displaying diagnostics on screen.
homepage
repositoryhttps://github.com/laundmo/bevy_screen_diagnostics
max_upload_size
id767020
size156,100
laund (laundmo)

documentation

https://docs.rs/bevy_screen_diagnostics

README

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:

  • [ScreenDiagnostics] which offers the basic functionality of displaying diagnostics.
  • [ScreenFrameDiagnosticsPlugin] display the framerate and frametime (also adds the corresponding bevy diagnostic plugin)
  • [ScreenEntityDiagnosticsPlugin] display the amount of entities (also adds the corresponding bevy diagnostic plugin)
  • [ScreenSystemInformationDiagnosticsPlugin] feature sysinfo_plugin only, display the memory and CPU usage of this process and the entire system (also adds the corresponding bevy diagnostic plugin)

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
Commit count: 45

cargo fmt