|
1 | 1 | use crate::{Material, MaterialPipeline, MaterialPipelineKey, MaterialPlugin};
|
2 |
| -use bevy_app::Plugin; |
| 2 | +use bevy_app::{Plugin, Update}; |
3 | 3 | use bevy_asset::{load_internal_asset, Assets, Handle, HandleUntyped};
|
4 | 4 | use bevy_ecs::prelude::*;
|
5 |
| -use bevy_reflect::{std_traits::ReflectDefault, Reflect, TypeUuid}; |
| 5 | +use bevy_reflect::{std_traits::ReflectDefault, Reflect, TypePath, TypeUuid}; |
6 | 6 | use bevy_render::{
|
7 | 7 | extract_resource::ExtractResource,
|
8 | 8 | mesh::{Mesh, MeshVertexBufferLayout},
|
@@ -31,10 +31,11 @@ impl Plugin for WireframePlugin {
|
31 | 31 | app.register_type::<Wireframe>()
|
32 | 32 | .register_type::<WireframeConfig>()
|
33 | 33 | .init_resource::<WireframeConfig>()
|
34 |
| - .add_plugin(MaterialPlugin::<WireframeMaterial>::default()) |
35 |
| - .add_system(apply_global) |
36 |
| - .add_system(apply_material); |
| 34 | + .add_plugins(MaterialPlugin::<WireframeMaterial>::default()) |
| 35 | + .add_systems(Update, apply_global) |
| 36 | + .add_systems(Update, apply_material); |
37 | 37 | }
|
| 38 | +} |
38 | 39 |
|
39 | 40 | /// Toggles wireframe rendering for any entity it is attached to.
|
40 | 41 | ///
|
@@ -104,7 +105,7 @@ fn apply_global(
|
104 | 105 | }
|
105 | 106 | }
|
106 | 107 |
|
107 |
| -#[derive(Default, AsBindGroup, TypeUuid, Debug, Clone)] |
| 108 | +#[derive(Default, AsBindGroup, TypeUuid, TypePath, Debug, Clone)] |
108 | 109 | #[uuid = "9e694f70-9963-4418-8bc1-3474c66b13b8"]
|
109 | 110 | struct WireframeMaterial {}
|
110 | 111 |
|
|
0 commit comments