Skip to content

Update text2d example to use children macro #18317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 22, 2025

Conversation

krunchington
Copy link
Contributor

Objective

Contributes to #18238
Updates the text2d, example to use the children! macro.

I'm not sure I love the SpawnIter usage here, as I feel the move keyword in this case is subtle and error prone for those who lose fights with the borrow checker frequently (like me). Feedback very much welcome.

Solution

Updates examples to use the Improved Spawning API merged in #17521

Testing

  • Did you test these changes? If so, how?
    • Opened the examples before and after and verified the same behavior was observed. I did this on Ubuntu 24.04.2 LTS using --features wayland.
  • Are there any parts that need more testing?
    • Other OS's and features can't hurt, but this is such a small change it shouldn't be a problem.
  • How can other people (reviewers) test your changes? Is there anything specific they need to know?
    • Run the examples yourself with and without these changes.
  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test?
    • see above

Showcase

n/a

Migration Guide

n/a

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 20, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 20, 2025
@alice-i-cecile alice-i-cecile removed this pull request from the merge queue due to a manual request Mar 20, 2025
..Default::default()
},
Transform::from_translation(250. * Vec3::Y),
Children::spawn(SpawnIter(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's just revert this changes here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went to rebase and all I had to do was accept from HEAD and it worked great 😅

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 20, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 22, 2025
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Mar 22, 2025
Merged via the queue into bevyengine:main with commit 5a9cb7d Mar 22, 2025
33 checks passed
@krunchington krunchington deleted the issue/18238-pi-day branch March 23, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants