forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog_diagnostics.rs
23 lines (21 loc) · 990 Bytes
/
log_diagnostics.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//! Shows different built-in plugins that logs diagnostics, like frames per second (FPS), to the console.
use bevy::{
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
prelude::*,
};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
// Adds frame time diagnostics
.add_plugin(FrameTimeDiagnosticsPlugin)
// Adds a system that prints diagnostics to the console
.add_plugin(LogDiagnosticsPlugin::default())
// Any plugin can register diagnostics
// 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())
// Uncomment this to add system info diagnostics:
// .add_plugin(bevy::diagnostic::SystemInformationDiagnosticsPlugin::default())
.run();
}