diff --git a/examples/ui/text_debug.rs b/examples/ui/text_debug.rs index 4ec71b3fcbfca..9e1672bacf069 100644 --- a/examples/ui/text_debug.rs +++ b/examples/ui/text_debug.rs @@ -21,7 +21,8 @@ struct TextChanges; fn infotext_system(commands: &mut Commands, asset_server: Res) { let font = asset_server.load("fonts/FiraSans-Bold.ttf"); - commands.spawn(CameraUiBundle::default()).spawn(TextBundle { + commands.spawn(CameraUiBundle::default()); + commands.spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, @@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res) { }, ..Default::default() }); - commands.spawn(CameraUiBundle::default()).spawn(TextBundle { + commands.spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, @@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res) { ..Default::default() }); commands - .spawn(CameraUiBundle::default()) .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, @@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res) { ..Default::default() }) .with(TextChanges); - commands.spawn(CameraUiBundle::default()).spawn(TextBundle { + commands.spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute,