fix(light despawn / pcss example): add extracted lights and shadow related components to SyncComponent for lights#23790
Conversation
8d5b5c4 to
77f4125
Compare
70401e5 to
77ecdb0
Compare
|
I think this overlaps with the observers, e.g. extracted_light_removed. We should probably remove the observers in favor of this? |
I removed that specific observer I also removed some (I think?) redundant code in |
|
I figured it out after reading #23713 a little more deeply!!! I’m confident this is a full fix now, and it fixes the pcss example completely 😄 |
…lated components to SyncComponent for lights (bevyengine#23790) # Objective - Fixes bevyengine#23769 ! ## Solution I `git bisect`’d the issue to bbcc1e6 which has to do with `SyncComponent`s. The problem was that not all the relevant components were being despawned when toggling an entity between different Light components within the example. Expanding `SyncComponents` for each light ensures that the lights clean up properly between toggling. I also had to review bevyengine#23713 and I connected the dots that de-spawning the light should also despawn the light view entity. Duh! ## Testing - `cargo run --example pcss --features=“experimental_pbr_pcss”`: toggling works!
Objective
Solution
I
git bisect’d the issue to bbcc1e6 which has to do withSyncComponents. The problem was that not all the relevant components were being despawned when toggling an entity between different Light components within the example. ExpandingSyncComponentsfor each light ensures that the lights clean up properly between toggling.I also had to review #23713 and I connected the dots that de-spawning the light should also despawn the light view entity. Duh!
Testing
cargo run --example pcss --features=“experimental_pbr_pcss”: toggling works!