From f86b168839a87c0547675f8b85925b00272dd982 Mon Sep 17 00:00:00 2001 From: IceSentry Date: Tue, 12 Jul 2022 21:44:05 -0400 Subject: [PATCH] fix wireframe --- crates/bevy_pbr/src/wireframe.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/bevy_pbr/src/wireframe.rs b/crates/bevy_pbr/src/wireframe.rs index a5df2ccec89d3..b194fa5983e54 100644 --- a/crates/bevy_pbr/src/wireframe.rs +++ b/crates/bevy_pbr/src/wireframe.rs @@ -6,6 +6,7 @@ use bevy_core_pipeline::core_3d::Opaque3d; use bevy_ecs::{prelude::*, reflect::ReflectComponent}; use bevy_reflect::std_traits::ReflectDefault; use bevy_reflect::{Reflect, TypeUuid}; +use bevy_render::Extract; use bevy_render::{ extract_resource::{ExtractResource, ExtractResourcePlugin}, mesh::{Mesh, MeshVertexBufferLayout}, @@ -50,8 +51,8 @@ impl Plugin for WireframePlugin { } } -fn extract_wireframes(mut commands: Commands, query: Query>) { - for entity in &query { +fn extract_wireframes(mut commands: Commands, query: Extract>>) { + for entity in query.iter() { commands.get_or_spawn(entity).insert(Wireframe); } }