From 56c76eaee054a24dec3ad80029f330e90a2db636 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 17 Mar 2024 14:55:09 +0100 Subject: [PATCH] add FPS diagnostics --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index e057fab..b6e9ceb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ mod world; mod settings; use bevy::window::{Window, WindowMode, PrimaryWindow, CursorGrabMode }; +use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}; use bevy::prelude::*; fn main() { @@ -24,6 +25,10 @@ fn main() { )) .add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest())) .add_plugins(camera::CameraControllerPlugin) + .add_plugins(( + FrameTimeDiagnosticsPlugin, + LogDiagnosticsPlugin::default(), + )) .run(); }