From fd3706b8dea2aa7732092f1d60354618390f3713 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Sat, 12 Dec 2020 17:55:20 -0700 Subject: [PATCH] Just spawn one CameraUiBundle (not 4) (#1047) --- examples/ui/text_debug.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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,