Replace RemovedComponents
with observers
#13928
Labels
A-ECS
Entities, components, systems, and events
C-Code-Quality
A section of code that is hard to understand or change
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
S-Blocked
This cannot move forward until something else changes
X-Contentious
There are nontrivial implications that should be thought through
Milestone
What problem does this solve or what need does it fill?
RemovedComponents
isn't a particularly nice tool: it doesn't fit into our existing tools for responding to changes well, doesn't allow users to read the data as it's being removed, must be continually monitored to avoid missing events, and risks desynchronization because of the polling-based mechanism.What solution would you like?
Observers (merged in #10839) offer an alternative solution to this problem space without the caveats.
We should deprecate and then remove [
RemovedComponents
], being careful to update and improve documentation and write a clear migration guide.In particular, users can emit events, triggered by an observer, to recreate the previous polling-style behavior when it is preferred.
What alternative(s) have you considered?
Other solutions to solve and/or work around the problem presented.
Additional context
#2148 proposes a
Removed
query filter, which might still be a valuable (if complex) complement even with this PR implemented.The text was updated successfully, but these errors were encountered: