Skip to content

Commit fd3706b

Browse files
authored
Just spawn one CameraUiBundle (not 4) (#1047)
1 parent 9239621 commit fd3706b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/ui/text_debug.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ struct TextChanges;
2121

2222
fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
2323
let font = asset_server.load("fonts/FiraSans-Bold.ttf");
24-
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
24+
commands.spawn(CameraUiBundle::default());
25+
commands.spawn(TextBundle {
2526
style: Style {
2627
align_self: AlignSelf::FlexEnd,
2728
position_type: PositionType::Absolute,
@@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
4344
},
4445
..Default::default()
4546
});
46-
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
47+
commands.spawn(TextBundle {
4748
style: Style {
4849
align_self: AlignSelf::FlexEnd,
4950
position_type: PositionType::Absolute,
@@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
7475
..Default::default()
7576
});
7677
commands
77-
.spawn(CameraUiBundle::default())
7878
.spawn(TextBundle {
7979
style: Style {
8080
align_self: AlignSelf::FlexEnd,
@@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
9898
..Default::default()
9999
})
100100
.with(TextChanges);
101-
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
101+
commands.spawn(TextBundle {
102102
style: Style {
103103
align_self: AlignSelf::FlexEnd,
104104
position_type: PositionType::Absolute,

0 commit comments

Comments
 (0)