-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
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 useS-Needs-ReviewNeeds reviewer attention (from anyone!) to move forwardNeeds reviewer attention (from anyone!) to move forward
Description
What problem does this solve or what need does it fill?
We have Observer::with_entities and Observer::with_entity, but for components it's only Observer::with_component. But for dynamic case I don't think with_ is convenient. In bevy_replicon I store ComponentId after user registrations and I need to create an observer for then during Plugin::finish.
What solution would you like?
Extend the API by adding Observer::add_component. It's not a builder and just pushes a component into the list of components.
What alternative(s) have you considered?
Add Observer::with_components that accepts an iterator, similar to Observer::with_entities. But for my use case add_component would be more convenient.
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 useS-Needs-ReviewNeeds reviewer attention (from anyone!) to move forwardNeeds reviewer attention (from anyone!) to move forward