Skip to content

Commit

Permalink
Just spawn one CameraUiBundle (not 4) (bevyengine#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanCut authored Dec 13, 2020
1 parent 9239621 commit fd3706b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/ui/text_debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ struct TextChanges;

fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
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,
Expand All @@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
},
..Default::default()
});
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
commands.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,
Expand Down Expand Up @@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
..Default::default()
});
commands
.spawn(CameraUiBundle::default())
.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
Expand All @@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
..Default::default()
})
.with(TextChanges);
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
commands.spawn(TextBundle {
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,
Expand Down

0 comments on commit fd3706b

Please sign in to comment.