Skip to content

Commit

Permalink
fix extract_wireframes (bevyengine#5301)
Browse files Browse the repository at this point in the history
# Objective

- Wireframes are currently not rendering on main because they aren't being extracted correctly

## Solution

- Extract the wireframes correctly
  • Loading branch information
IceSentry authored and inodentry committed Aug 8, 2022
1 parent 879c24e commit 77379ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/bevy_pbr/src/wireframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -50,8 +51,8 @@ impl Plugin for WireframePlugin {
}
}

fn extract_wireframes(mut commands: Commands, query: Query<Entity, With<Wireframe>>) {
for entity in &query {
fn extract_wireframes(mut commands: Commands, query: Extract<Query<Entity, With<Wireframe>>>) {
for entity in query.iter() {
commands.get_or_spawn(entity).insert(Wireframe);
}
}
Expand Down

0 comments on commit 77379ff

Please sign in to comment.