From 8e2f7858b29618e0a295431bbaf8729a0bf73506 Mon Sep 17 00:00:00 2001 From: Pietrek14 Date: Sun, 5 Mar 2023 12:40:40 +0100 Subject: [PATCH] made the worldinspectorplugin debug-only --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5d56365..ea5a762 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,7 +44,6 @@ impl Plugin for ArkanoidPlugin { ..default() })) .add_plugin(RapierPhysicsPlugin::::pixels_per_meter(4.)) - .add_plugin(WorldInspectorPlugin) .add_plugin(camera::CameraPlugin) .add_plugin(actions::ActionsPlugin) .add_plugin(cursor::CursorPlugin) @@ -56,5 +55,10 @@ impl Plugin for ArkanoidPlugin { .add_plugin(ui::UiPlugin) .add_plugin(block::BlockPlugin) .add_state(GameState::Loading); + + // Debug-only plugins + if cfg!(debug_assertions) { + app.add_plugin(WorldInspectorPlugin); + } } }