-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be mergedThis issue or PR is particularly complex, and needs an approved design doc before it can be merged
Description
What problem does this solve or what need does it fill?
Various commands operate on either components or bundles. The end user doesn't want to think up which one they're using, and this leads to code duplication and API bloat.
What solution would you like?
Condense .insert_bundle
, .remove_bundle
and so on down into single methods that operate on either bundles or components.
My preference would be to use a shared trait that is implied by both the Component
and Bundle
trait to do so.
What alternative(s) have you considered?
As a hack, you could make derive(Component)
also implement Bundle
, and then only keep the bundle forms around.
Additional context
Enabled by #1843 (and #2254). Inspired by #2252, which encourages a hard split between components and bundles.
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be mergedThis issue or PR is particularly complex, and needs an approved design doc before it can be merged