We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dfcde6 commit 58c978eCopy full SHA for 58c978e
crates/bevy_camera/src/visibility/mod.rs
@@ -679,7 +679,9 @@ pub fn add_visibility_class<C>(
679
) where
680
C: 'static,
681
{
682
- if let Some(mut visibility_class) = world.get_mut::<VisibilityClass>(entity) {
+ if let Some(mut visibility_class) = world.get_mut::<VisibilityClass>(entity)
683
+ && !visibility_class.contains(&TypeId::of::<C>())
684
+ {
685
visibility_class.push(TypeId::of::<C>());
686
}
687
0 commit comments