-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add EntityRef::get_components_dyn() and EntityMut::get_components_dyn() to query multiple components #15577
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 useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Description
What problem does this solve or what need does it fill?
The dynamic query API World::get_many_entities_dynamic_mut() returns an EntityMut which can access all components of an entity... but only one by one. Often you need to access 2+ components at once.
What solution would you like?
Add the proposed methods which allow retrieving more than 1 component at once.
What alternative(s) have you considered?
There's no alternative possible from user code I think.
Reactions are currently unavailable
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 useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!