bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.39k stars 3.59k forks source link

Refresh `RenderVisibilityRanges` when a visibility range is removed from the scene. #16467

Closed pcwalton closed 2 days ago

pcwalton commented 3 days ago

We have an early-out to avoid updating RenderVisibilityRanges when a VisibilityRange component is modified, but not when one is removed. This means that removing VisibilityRange from an entity might not update the rendering.

This PR fixes the issue by adding a check for removed VisibilityRanges.