mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
acbed6040e
# Objective Ensure that components that are conditionally extracted do not linger in the render world when not extracted from the main world. ## Solution If the `ExtractComponent` returns `None`, we'll remove the render world component. I think this is the most sensible behavior here. In the future if there really is a use case for keeping the previous render component around, we could add a `Option<Self::Out>` parameter for the previous render component to the method, or something similar. I think that this follows the principle of least surprise here relative to what `None` would suggest and the way that render nodes are typically written. The alternative would be to add an `enabled` field to pretty much every camera settings component, or duplicate the extraction condition as #15856 does. ## Testing `transmission` no longer crashes. ## Migration Guide Components that implement `ExtractComponent` and return `None` will cause the extracted component to be removed from the render world. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |