diff --git a/crates/bevy_text/src/text.rs b/crates/bevy_text/src/text.rs index 06f8adf86c38f..a50d9a8f7820c 100644 --- a/crates/bevy_text/src/text.rs +++ b/crates/bevy_text/src/text.rs @@ -170,11 +170,13 @@ impl TextLayout { /// # use bevy_ecs::world::World; /// # use bevy_text::{Font, TextLayout, TextFont, TextSpan, TextColor}; /// # use bevy_hierarchy::BuildChildren; -/// +/// # /// # let font_handle: Handle = Default::default(); /// # let mut world = World::default(); /// # /// world.spawn(( +/// // `Text` or `Text2d` are needed, and will provide default instances +/// // of the following components. /// TextLayout::default(), /// TextFont { /// font: font_handle.clone().into(), @@ -184,6 +186,7 @@ impl TextLayout { /// TextColor(BLUE.into()), /// )) /// .with_child(( +/// // Children must be `TextSpan`, not `Text` or `Text2d`. /// TextSpan::new("Hello!"), /// TextFont { /// font: font_handle.into(),