diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index e5f8e7b086de9..cb3c446a1ad7a 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -83,6 +83,10 @@ use bevy_ecs::{ use bevy_math::Vec3; use bevy_reflect::TypePath; +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] use crate::config::GizmoMeshConfig; #[cfg(feature = "bevy_render")] @@ -600,7 +604,10 @@ impl RenderCommand

for SetLineGizmoBindGroup #[cfg(feature = "bevy_render")] struct DrawLineGizmo; -#[cfg(feature = "bevy_render")] +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] impl RenderCommand

for DrawLineGizmo { type Param = SRes>; type ViewQuery = (); @@ -653,7 +660,10 @@ impl RenderCommand

for DrawLineGizmo { #[cfg(feature = "bevy_render")] struct DrawLineJointGizmo; -#[cfg(feature = "bevy_render")] +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] impl RenderCommand

for DrawLineJointGizmo { type Param = SRes>; type ViewQuery = ();