#bevy-ui #bevy #display #perf #gamedev #time #overlay

iyes_perf_ui

Customizable Performance/Debug Overlay for Bevy UI

5 releases

0.2.3 Mar 21, 2024
0.2.2 Mar 21, 2024
0.2.1 Mar 21, 2024
0.2.0 Mar 21, 2024
0.1.0 Mar 19, 2024

#394 in Game dev

Download history 326/week @ 2024-03-16 133/week @ 2024-03-23 141/week @ 2024-03-30 116/week @ 2024-04-06 200/week @ 2024-04-13 118/week @ 2024-04-20

587 downloads per month

MIT/Apache

87KB
2K SLoC

Customizable Performance/Debug Overlay for Bevy UI

Crates.io docs MIT/Apache 2.0

Sponsor me:

GitHub Sponsors

Bevy Compatibility:

Bevy Version Plugin Version
0.13 0.2,0.1

This crate provides an implementation of an in-game performance/debug UI overlay for the Bevy game engine.

The goal of this crate is to make it as useful as possible for any Bevy project:

  • Made with Bevy UI (not egui or any other 3rd-party UI solution)
  • Easy to set up (see simple example)
  • Modular! You decide what info you want to display!
    • Choose any combination of predefined entries (see specific_entries example):
      • Framerate (FPS), Frame Time, Frame Count, ECS Entity Count, CPU Usage, RAM Usage, Wall Clock, Running Time, Fixed Time Step, Fixed Overstep, Cursor Position, Window Resolution, Window Scale Factor, Window Mode, Present Mode
    • Implement your own custom entries to display anything you like!
  • Customizable appearance/styling (see settings, fps_minimalist examples)
  • Support for highlighting values using a custom font or color!
    • Allows you to quickly notice if something demands your attention.

Spawning a Perf UI can be as simple as:

commands.spawn(PerfUiCompleteBundle::default());

If you want to create a Perf UI with specific entries of your choice, just spawn an entity with PerfUiRoot + your desired entries, instead of using the bundle.

commands.spawn((
   PerfUiRoot::default(),
   PerfUiEntryFPS::default(),
   PerfUiEntryClock::default(),
   // ...
));

If you want to customize the appearance, set the various fields in each of the structs, instead of using default().

Screenshot of the simple example showing default configuration

Screenshot of the settings example showing multiple UIs with custom configuration

Dependencies

~42–80MB
~1.5M SLoC