diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs index c3fc6e5516..9d94fdc7d1 100644 --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -21,7 +21,7 @@ use wgpu::{ pub mod screenshot; -use screenshot::{ScreenshotPlugin, ScreenshotToScreenPipeline}; +use screenshot::ScreenshotPlugin; pub struct WindowRenderPlugin; @@ -43,12 +43,6 @@ impl Plugin for WindowRenderPlugin { .add_systems(Render, prepare_windows.in_set(RenderSet::ManageViews)); } } - - fn finish(&self, app: &mut App) { - if let Some(render_app) = app.get_sub_app_mut(RenderApp) { - render_app.init_resource::(); - } - } } pub struct ExtractedWindow { diff --git a/crates/bevy_render/src/view/window/screenshot.rs b/crates/bevy_render/src/view/window/screenshot.rs index 6e223eedaf..5522f6d763 100644 --- a/crates/bevy_render/src/view/window/screenshot.rs +++ b/crates/bevy_render/src/view/window/screenshot.rs @@ -425,6 +425,7 @@ impl Plugin for ScreenshotPlugin { .init_resource::() .init_resource::() .init_resource::>() + .init_resource::() .add_systems(ExtractSchedule, extract_screenshots.ambiguous_with_all()) .add_systems( Render,