-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Ergonomic tools for working with Commands from &mut World #3096
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
What problem does this solve or what need does it fill?
Even when working with exclusive world access, work often needs to be deferred to satisfy soundness.
This occurs most commonly when iterating over a query or in other looping contexts.
What solution would you like?
Add
World::commands(), which fetches a fresh instance ofCommands.Add
World::apply_commands(), for a simpleWhat alternative(s) have you considered?
This is a partial, tightly-scoped alternative to some of the frustrations that inspired bevyengine/rfcs#42.
Additional context
World::apply_commandscan currently be achieved with this snippet: