-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed as not planned
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Description
What problem does this solve or what need does it fill?
World::resource_scope is very useful for complex access patterns in exclusive systems.
However, it doesn't work with queries.
What solution would you like?
Add `fn query_scope(|q: Query<Q: WorldQuery, F: WorldQuery + FilterFetch>, world: &mut World |{}).
This temporarily removes all matching entities from the World, splitting the borrow.
What alternative(s) have you considered?
Use #4090 or SystemState instead. This won't cover all use cases: there are some things that can only be done with a &mut World.
Expand WorldCell to support queries, per #1555. This is substantially more error prone and slower, as the borrow-checking is done at runtime instead.
BoxyUwU, MiniaczQ and dayswithDJMcNab and BoxyUwU
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use