-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 by Bors] - Add iter_entities to World #6228 #6242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and thorough tests :) Once the doc nits and the .copied changes are made I'll be happy to approve this.
@ramirezmike once you've made the appropriate changes feel free to resolve the comments :) |
Could you use this new function in the scene code from #6227? |
Yep, it would be ideal to clean that code up while we're here. If you don't have time, I'll merge this on Monday and make a new easy. |
I rebased and added a commit to update dynamic_scene.rs to use iter_entities. I know the code is pretty much the same and all the tests pass, but I'll admit, I'm not too familiar with the behavior of dynamic_scene. I ran the scene/scene example before and after the changes and compared the output and it was the same. Let me know if you'd like me to do more extensive testing though 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That refactor looks great; that's exactly what I was hoping to see.
bors r+ |
# Objective - Add a way to iterate over all entities from &World ## Solution - Added a function `iter_entities` on World which returns an iterator of `Entity` derived from the entities in the `World`'s `archetypes` --- ## Changelog - Added a function `iter_entities` on World, allowing iterating over all entities in contexts where you only have read-only access to the World.
Pull request successfully merged into main. Build succeeded: |
# Objective - Add a way to iterate over all entities from &World ## Solution - Added a function `iter_entities` on World which returns an iterator of `Entity` derived from the entities in the `World`'s `archetypes` --- ## Changelog - Added a function `iter_entities` on World, allowing iterating over all entities in contexts where you only have read-only access to the World.
# Objective - Add a way to iterate over all entities from &World ## Solution - Added a function `iter_entities` on World which returns an iterator of `Entity` derived from the entities in the `World`'s `archetypes` --- ## Changelog - Added a function `iter_entities` on World, allowing iterating over all entities in contexts where you only have read-only access to the World.
# Objective - Add a way to iterate over all entities from &World ## Solution - Added a function `iter_entities` on World which returns an iterator of `Entity` derived from the entities in the `World`'s `archetypes` --- ## Changelog - Added a function `iter_entities` on World, allowing iterating over all entities in contexts where you only have read-only access to the World.
# Objective - Add a way to iterate over all entities from &World ## Solution - Added a function `iter_entities` on World which returns an iterator of `Entity` derived from the entities in the `World`'s `archetypes` --- ## Changelog - Added a function `iter_entities` on World, allowing iterating over all entities in contexts where you only have read-only access to the World.
Objective
Solution
iter_entities
on World which returns an iterator ofEntity
derived from the entities in theWorld
'sarchetypes
Changelog
iter_entities
on World, allowing iterating over all entities in contexts where you only have read-only access to the World.