@@ -26,7 +26,7 @@ extern crate self as bevy_gizmos;
2626#[ derive( SystemSet , Clone , Debug , Hash , PartialEq , Eq ) ]
2727pub enum GizmoRenderSystem {
2828 /// Adds gizmos to the [`Transparent2d`](bevy_core_pipeline::core_2d::Transparent2d) render phase
29- #[ cfg( feature = "bevy_sprite " ) ]
29+ #[ cfg( feature = "bevy_render_2d " ) ]
3030 QueueLineGizmos2d ,
3131 /// Adds gizmos to the [`Transparent3d`](bevy_core_pipeline::core_3d::Transparent3d) render phase
3232 #[ cfg( feature = "bevy_pbr" ) ]
@@ -50,7 +50,7 @@ pub mod rounded_box;
5050#[ cfg( all( feature = "bevy_pbr" , feature = "bevy_render" ) ) ]
5151pub mod light;
5252
53- #[ cfg( all( feature = "bevy_sprite " , feature = "bevy_render" ) ) ]
53+ #[ cfg( all( feature = "bevy_render_2d " , feature = "bevy_render" ) ) ]
5454mod pipeline_2d;
5555#[ cfg( all( feature = "bevy_pbr" , feature = "bevy_render" ) ) ]
5656mod pipeline_3d;
@@ -90,7 +90,7 @@ use bevy_reflect::TypePath;
9090
9191#[ cfg( all(
9292 feature = "bevy_render" ,
93- any( feature = "bevy_pbr" , feature = "bevy_sprite " )
93+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " )
9494) ) ]
9595use crate :: config:: GizmoMeshConfig ;
9696
@@ -127,7 +127,7 @@ use {
127127
128128#[ cfg( all(
129129 feature = "bevy_render" ,
130- any( feature = "bevy_pbr" , feature = "bevy_sprite " ) ,
130+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " ) ,
131131) ) ]
132132use bevy_render:: render_resource:: { VertexAttribute , VertexBufferLayout , VertexStepMode } ;
133133use bevy_time:: Fixed ;
@@ -148,7 +148,7 @@ const LINE_JOINT_SHADER_HANDLE: Handle<Shader> =
148148
149149/// A [`Plugin`] that provides an immediate mode drawing api for visual debugging.
150150///
151- /// Requires to be loaded after [`PbrPlugin`](bevy_pbr::PbrPlugin) or [`SpritePlugin`](bevy_sprite ::SpritePlugin).
151+ /// Requires to be loaded after [`PbrPlugin`](bevy_pbr::PbrPlugin) or [`SpritePlugin`](bevy_render_2d ::SpritePlugin).
152152#[ derive( Default ) ]
153153pub struct GizmoPlugin ;
154154
@@ -190,11 +190,11 @@ impl Plugin for GizmoPlugin {
190190
191191 render_app. add_systems ( ExtractSchedule , ( extract_gizmo_data, extract_linegizmos) ) ;
192192
193- #[ cfg( feature = "bevy_sprite " ) ]
194- if app. is_plugin_added :: < bevy_sprite :: SpritePlugin > ( ) {
193+ #[ cfg( feature = "bevy_render_2d " ) ]
194+ if app. is_plugin_added :: < bevy_render_2d :: mesh_pipeline :: Mesh2dRenderPlugin > ( ) {
195195 app. add_plugins ( pipeline_2d:: LineGizmo2dPlugin ) ;
196196 } else {
197- tracing:: warn!( "bevy_sprite feature is enabled but bevy_sprite::SpritePlugin was not detected. Are you sure you loaded GizmoPlugin after SpritePlugin ?" ) ;
197+ tracing:: warn!( "bevy_render_2d feature is enabled but bevy_render_2d::mesh_pipeline::Mesh2dRenderPlugin was not detected. Are you sure you loaded GizmoPlugin after Mesh2dRenderPlugin ?" ) ;
198198 }
199199 #[ cfg( feature = "bevy_pbr" ) ]
200200 if app. is_plugin_added :: < bevy_pbr:: PbrPlugin > ( ) {
@@ -474,7 +474,7 @@ fn extract_gizmo_data(
474474 #[ cfg( feature = "webgl" ) ]
475475 _padding : Default :: default ( ) ,
476476 } ,
477- #[ cfg ( any ( feature = "bevy_pbr" , feature = "bevy_sprite " ) ) ]
477+ #[ cfg ( any ( feature = "bevy_pbr" , feature = "bevy_render_2d " ) ) ]
478478 GizmoMeshConfig {
479479 line_perspective : config. line . perspective ,
480480 line_style : config. line . style ,
@@ -655,7 +655,7 @@ impl<const I: usize, P: PhaseItem> RenderCommand<P> for SetLineGizmoBindGroup<I>
655655struct DrawLineGizmo < const STRIP : bool > ;
656656#[ cfg( all(
657657 feature = "bevy_render" ,
658- any( feature = "bevy_pbr" , feature = "bevy_sprite " )
658+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " )
659659) ) ]
660660impl < P : PhaseItem , const STRIP : bool > RenderCommand < P > for DrawLineGizmo < STRIP > {
661661 type Param = SRes < RenderAssets < GpuLineGizmo > > ;
@@ -718,7 +718,7 @@ impl<P: PhaseItem, const STRIP: bool> RenderCommand<P> for DrawLineGizmo<STRIP>
718718struct DrawLineJointGizmo ;
719719#[ cfg( all(
720720 feature = "bevy_render" ,
721- any( feature = "bevy_pbr" , feature = "bevy_sprite " )
721+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " )
722722) ) ]
723723impl < P : PhaseItem > RenderCommand < P > for DrawLineJointGizmo {
724724 type Param = SRes < RenderAssets < GpuLineGizmo > > ;
@@ -791,7 +791,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawLineJointGizmo {
791791
792792#[ cfg( all(
793793 feature = "bevy_render" ,
794- any( feature = "bevy_pbr" , feature = "bevy_sprite " )
794+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " )
795795) ) ]
796796fn line_gizmo_vertex_buffer_layouts ( strip : bool ) -> Vec < VertexBufferLayout > {
797797 use VertexFormat :: * ;
@@ -849,7 +849,7 @@ fn line_gizmo_vertex_buffer_layouts(strip: bool) -> Vec<VertexBufferLayout> {
849849
850850#[ cfg( all(
851851 feature = "bevy_render" ,
852- any( feature = "bevy_pbr" , feature = "bevy_sprite " )
852+ any( feature = "bevy_pbr" , feature = "bevy_render_2d " )
853853) ) ]
854854fn line_joint_gizmo_vertex_buffer_layouts ( ) -> Vec < VertexBufferLayout > {
855855 use VertexFormat :: * ;
0 commit comments