@@ -9,7 +9,7 @@ use bevy_image::ToExtents;
99use bevy_platform:: collections:: { HashMap , HashSet } ;
1010use bevy_render:: {
1111 batching:: gpu_preprocessing:: GpuPreprocessingMode ,
12- camera:: CameraRenderGraph ,
12+ camera:: { CameraPlugin , CameraRenderGraph } ,
1313 render_phase:: PhaseItemBatchSetKey ,
1414 view:: { ExtractedView , RetainedViewEntity } ,
1515} ;
@@ -22,10 +22,13 @@ use crate::upscaling::upscaling;
2222use crate :: Core2dSystems ;
2323use bevy_app:: { App , Plugin } ;
2424use bevy_ecs:: prelude:: * ;
25+ use bevy_extract:: {
26+ extract_component:: ExtractComponentPlugin , sync_world:: MainEntity , Extract , ExtractSchedule ,
27+ Render , RenderApp , RenderSystems ,
28+ } ;
2529use bevy_math:: FloatOrd ;
2630use bevy_render:: {
2731 camera:: ExtractedCamera ,
28- extract_component:: ExtractComponentPlugin ,
2932 render_phase:: {
3033 sort_phase_system, BinnedPhaseItem , CachedRenderPipelinePhaseItem , DrawFunctionId ,
3134 DrawFunctions , PhaseItem , PhaseItemExtraIndex , SortedPhaseItem , ViewBinnedRenderPhases ,
@@ -36,10 +39,8 @@ use bevy_render::{
3639 TextureUsages ,
3740 } ,
3841 renderer:: RenderDevice ,
39- sync_world:: MainEntity ,
4042 texture:: TextureCache ,
4143 view:: { Msaa , ViewDepthTexture } ,
42- Extract , ExtractSchedule , Render , RenderApp , RenderSystems ,
4344} ;
4445
4546pub const CORE_2D_DEPTH_FORMAT : TextureFormat = TextureFormat :: Depth32Float ;
@@ -53,7 +54,7 @@ impl Plugin for Core2dPlugin {
5354 CameraRenderGraph :: new ( Core2d )
5455 } )
5556 . register_required_components_with :: < Camera2d , Tonemapping > ( || Tonemapping :: None )
56- . add_plugins ( ExtractComponentPlugin :: < Camera2d > :: default ( ) ) ;
57+ . add_plugins ( ExtractComponentPlugin :: < Camera2d , CameraPlugin > :: default ( ) ) ;
5758
5859 let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
5960 return ;
0 commit comments