Description
What problem does this solve or what need does it fill?
WithBundle
promotes unidiomatic OOP-style code in Bevy that is hard to extend and maintain. It also doesn't behave the way many users would hope it does: it will detect any entities with the set of components within the bundle, rather than only entities spawned with the bundle.
It is also particularly odd to have the ability to filter on bundles but not request them (#2252), causing user confusion.
What solution would you like?
Remove WithBundle
. Existing users can use combined With
filters (ideally with marker components), or even write their own query filter types if they desperately need this.
What alternative(s) have you considered?
Complain about its usage in code reviews and discourage (or ignore it) in the docs.
Additional context
We should attempt to remove this sooner rather than later to reduce the pain. If and when bundles are properly stored on the entity (perhaps for editor purposes?), we can consider adding this and #2252.