bevy
bevy copied to clipboard
add `Resources::iter` to iterate over all resource IDs
Objective
In bevy 0.8 you could list all resources using world.archetypes().resource().components(). As far as I can tell the resource archetype has been replaced with the Resources storage, and it would be nice if it could be used to iterate over all resource component IDs as well.
Solution
- add
fn Resources::iter(&self) -> impl Iterator<Item = (ComponentId, &ResourceData)>