From 06fa6196a8b7f3304db95fdb721cc55229a75cbb Mon Sep 17 00:00:00 2001 From: Eterniance Date: Mon, 12 Jan 2026 20:23:06 +0100 Subject: [PATCH 1/2] Document bevy_scene requirement for example --- src/collision/collider/constructor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/collision/collider/constructor.rs b/src/collision/collider/constructor.rs index 9a6b1c2ac..ce604dfcf 100644 --- a/src/collision/collider/constructor.rs +++ b/src/collision/collider/constructor.rs @@ -107,6 +107,7 @@ use itertools::Either; /// )); /// } /// ``` +/// Note that this example needs the default feature `bevy_scene`. #[derive(Component, Clone, Debug, Default, PartialEq, Reflect)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serialize", reflect(Serialize, Deserialize))] From cf906f9b47a75e001658c0f017a457e28902e5f1 Mon Sep 17 00:00:00 2001 From: Joona Aalto Date: Sun, 1 Feb 2026 01:28:16 +0200 Subject: [PATCH 2/2] Add doc comments earlier, where scene behavior is described --- src/collision/collider/constructor.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/collision/collider/constructor.rs b/src/collision/collider/constructor.rs index ce604dfcf..3c4a93d75 100644 --- a/src/collision/collider/constructor.rs +++ b/src/collision/collider/constructor.rs @@ -12,7 +12,8 @@ use itertools::Either; /// In contrast to [`ColliderConstructor`], this component will *not* generate a collider on its own entity. /// /// If this component is used on a scene, such as one spawned by a [`SceneRoot`], it will -/// wait until the scene is loaded before generating colliders. +/// wait until the scene is loaded before generating colliders. Note that this requires +/// the `bevy_scene` feature to be enabled. /// /// The exact configuration for each descendant can be specified using the helper methods /// such as [`with_constructor_for_name`](Self::with_constructor_for_name). @@ -30,6 +31,9 @@ use itertools::Either; /// /// # Example /// +/// Below are some examples of using [`ColliderConstructorHierarchy`] to generate colliders +/// for a glTF scene at runtime. Note that this requires the `bevy_scene` feature to be enabled. +/// /// ``` #[cfg_attr(feature = "2d", doc = "use avian2d::prelude::*;")] #[cfg_attr(feature = "3d", doc = "use avian3d::prelude::*;")] @@ -107,7 +111,6 @@ use itertools::Either; /// )); /// } /// ``` -/// Note that this example needs the default feature `bevy_scene`. #[derive(Component, Clone, Debug, Default, PartialEq, Reflect)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serialize", reflect(Serialize, Deserialize))]