diff --git a/404.html b/404.html index ff4b546..1148c79 100644 --- a/404.html +++ b/404.html @@ -83,7 +83,7 @@ diff --git a/FAQ.html b/FAQ.html index fc7fa3f..d169cb2 100644 --- a/FAQ.html +++ b/FAQ.html @@ -82,7 +82,7 @@ diff --git a/design/why-tiled.html b/design/why-tiled.html index 2fbba28..6893512 100644 --- a/design/why-tiled.html +++ b/design/why-tiled.html @@ -82,7 +82,7 @@ diff --git a/guides/debug.html b/guides/debug.html new file mode 100644 index 0000000..fbbe85f --- /dev/null +++ b/guides/debug.html @@ -0,0 +1,259 @@ + + + + + + Debug your project - bevy_ecs_tiled Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+
+

Debug your project

+

bevy-inspector-egui

+

This may be obvious but this plugin is a must have for debugging.

+

Just add the required dependency in Cargo.toml:

+
[dependencies]
+bevy-inspector-egui = "0.25.2"
+
+

Then add the WorldInspectorPlugin to your application:

+
use bevy::prelude::*;
+use bevy_inspector_egui::quick::WorldInspectorPlugin;
+
+fn main() {
+    App::new()
+        .add_plugins(WorldInspectorPlugin::new())
+        .run();
+}
+
+

Now, you can browse componentns from all entities spawned in your game.

+

More informations on the project github page.

+

TiledMapDebugPlugin

+

bevy_ecs_tiled provides a debug plugin that displays a gizmos where Tiled object are spawned.

+

To use it, you just have to add the plugin to your application:

+
use bevy::prelude::*;
+use bevy_ecs_tiled::prelude::*;
+
+fn main() {
+    App::new()
+        .add_plugins(TiledMapDebugPlugin::default())
+        .run();
+}
+
+

More informations in the API reference.

+

Physics

+

Both Avian and Rapier provide their own way of debugging. +It can be very useful, especially when working with colliders. +Note that physics debugging is enabled by default in all bevy_ecs_tiled examples using physics.

+

To enable physics debugging in Avian, you need to simply add the corresponding plugin:

+
use bevy::prelude::*;
+use avian2d::prelude::*;
+
+fn main() {
+    App::new()
+        // Add Avian regular plugin
+        .add_plugins(PhysicsPlugins::default().with_length_unit(100.0))
+        // Add Avian debug plugin
+        .add_plugins(PhysicsDebugPlugin::default())
+        .run();
+}
+
+

For Rapier, you also need to enable a debug plugin:

+
use bevy::prelude::*;
+use bevy_rapier2d::prelude::*;
+
+fn main() {
+    App::new()
+        // Add Rapier regular plugin
+        .add_plugins(RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(100.0))
+        // Add Rapier debug plugin
+        .add_plugins(RapierDebugRenderPlugin::default())
+        .run();
+}
+
+

But you also need to enable either the debug-render-2d feature on bevy_rapier2d crate or the rapier_debug feature on bevy_ecs_tiled

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/guides/minimal.html b/guides/minimal.html index b5d2b68..3aa85cc 100644 --- a/guides/minimal.html +++ b/guides/minimal.html @@ -82,7 +82,7 @@ diff --git a/guides/physics.html b/guides/physics.html index 8243a06..c1eae63 100644 --- a/guides/physics.html +++ b/guides/physics.html @@ -3,7 +3,7 @@ - Use a physics backend - bevy_ecs_tiled Documentation + Use physics - bevy_ecs_tiled Documentation @@ -82,7 +82,7 @@ diff --git a/guides/properties.html b/guides/properties.html index 8575b68..847e0fa 100644 --- a/guides/properties.html +++ b/guides/properties.html @@ -82,7 +82,7 @@ @@ -270,7 +270,7 @@

Further rea - @@ -284,7 +284,7 @@

Further rea - diff --git a/guides/spawn_reload.html b/guides/spawn_reload.html index 0bb858f..ea9e61c 100644 --- a/guides/spawn_reload.html +++ b/guides/spawn_reload.html @@ -82,7 +82,7 @@ diff --git a/index.html b/index.html index 25faba4..b578132 100644 --- a/index.html +++ b/index.html @@ -82,7 +82,7 @@ diff --git a/misc/api-reference.html b/misc/api-reference.html index c9f8778..373741c 100644 --- a/misc/api-reference.html +++ b/misc/api-reference.html @@ -82,7 +82,7 @@ diff --git a/misc/contributing.html b/misc/contributing.html index 4f95cd0..10ad9e6 100644 --- a/misc/contributing.html +++ b/misc/contributing.html @@ -82,7 +82,7 @@ diff --git a/misc/useful-links.html b/misc/useful-links.html index 2fc8be0..353e265 100644 --- a/misc/useful-links.html +++ b/misc/useful-links.html @@ -82,7 +82,7 @@ @@ -171,7 +171,7 @@

Notable r