2022-05-16 13:53:20 +00:00
|
|
|
//! Shows different built-in plugins that logs diagnostics, like frames per second (FPS), to the console.
|
|
|
|
|
2020-05-04 21:14:49 +00:00
|
|
|
use bevy::{
|
2020-12-24 19:28:31 +00:00
|
|
|
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
|
2020-05-04 21:14:49 +00:00
|
|
|
prelude::*,
|
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {
|
2021-07-27 20:21:06 +00:00
|
|
|
App::new()
|
2020-11-03 03:01:17 +00:00
|
|
|
.add_plugins(DefaultPlugins)
|
2020-05-18 01:48:14 +00:00
|
|
|
// Adds frame time diagnostics
|
2020-05-04 21:14:49 +00:00
|
|
|
.add_plugin(FrameTimeDiagnosticsPlugin::default())
|
2020-05-18 01:48:14 +00:00
|
|
|
// Adds a system that prints diagnostics to the console
|
2020-12-24 19:28:31 +00:00
|
|
|
.add_plugin(LogDiagnosticsPlugin::default())
|
2020-05-18 01:48:14 +00:00
|
|
|
// Any plugin can register diagnostics
|
2020-12-24 19:28:31 +00:00
|
|
|
// Uncomment this to add an entity count diagnostics:
|
|
|
|
// .add_plugin(bevy::diagnostic::EntityCountDiagnosticsPlugin::default())
|
|
|
|
// Uncomment this to add an asset count diagnostics:
|
|
|
|
// .add_plugin(bevy::asset::diagnostic::AssetCountDiagnosticsPlugin::<Texture>::default())
|
2023-01-02 20:49:43 +00:00
|
|
|
// Uncomment this to add system info diagnostics:
|
|
|
|
// .add_plugin(bevy::diagnostic::SystemInformationDiagnosticsPlugin::default())
|
2020-05-04 21:14:49 +00:00
|
|
|
.run();
|
|
|
|
}
|