Skip to content

Support With<Bundle> rather than just With<Component> #9215

Closed
@ItsDoot

Description

@ItsDoot

What problem does this solve or what need does it fill?

Now that all Components are Bundles, it seems like this could be done, in theory.
It would potentially reduce Query type complexity:

pub fn my_system(Query<&Name, (With<Foo>, With<Bar>, With<Baz>)>) {}
// vs
pub fn my_system(Query<&Name, With<(Foo, Bar, Baz)>>) {}

What solution would you like?

Implement With<T: Bundle> and Without<T: Bundle>, rather than With<T: Component>.

What alternative(s) have you considered?

Continue to work under status quo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions