Skip to content

Add EntityRef::get_components_dyn() and EntityMut::get_components_dyn() to query multiple components #15577

@djeedai

Description

@djeedai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions