aboutsummaryrefslogtreecommitdiff
path: root/src/debug.rs
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2022-06-12 14:28:10 +0200
committerjacopograndi <jacopo.grandi@outlook.it>2022-06-12 14:28:10 +0200
commitcd08f79d84411d6f4dff8a18ab79b363963f01b8 (patch)
tree56efacf23349cfb2ee22adf40ed2cd74e22082f3 /src/debug.rs
fresh
Diffstat (limited to 'src/debug.rs')
-rw-r--r--src/debug.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/debug.rs b/src/debug.rs
new file mode 100644
index 0000000..4036ced
--- /dev/null
+++ b/src/debug.rs
@@ -0,0 +1,12 @@
+use bevy::prelude::*;
+use bevy_inspector_egui::{RegisterInspectable, WorldInspectorPlugin};
+
+pub struct DebugPlugin;
+
+impl Plugin for DebugPlugin {
+ fn build(&self, app: &mut App) {
+ if cfg!(debug_assertions) {
+ app.add_plugin(WorldInspectorPlugin::new());
+ }
+ }
+}