diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index 50ea668f14c7c..65ffeda9637b1 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -357,12 +357,12 @@ fn propagate_recursive( /// Entities that are visible will be marked as such later this frame /// by a [`VisibilitySystems::CheckVisibility`] system. fn reset_view_visibility(mut query: Query<&mut ViewVisibility>) { - for mut view_visibility in &mut query { + query.iter_mut().for_each(|mut view_visibility| { // NOTE: We do not use `set_if_neq` here, as we don't care about // change detection for view visibility, and adding a branch to every // loop iteration would pessimize performance. - *view_visibility = ViewVisibility::HIDDEN; - } + *view_visibility.bypass_change_detection() = ViewVisibility::HIDDEN; + }); } /// System updating the visibility of entities each frame.