From e072625264006eaf0d2fb6989561abff98706c3c Mon Sep 17 00:00:00 2001 From: andriyDev Date: Mon, 30 Jun 2025 20:24:41 -0700 Subject: [PATCH] Move `ExtractInstancesPlugin` init to app. (#19867) # Objective - This plugin currently does nothing. That's because we add the plugin to the `RenderApp`. Inside the plugin it then looks for the `RenderApp` itself, but since it was added **to** the `RenderApp`, it will never find the `RenderApp`. ## Solution - Move the plugin into build, and more importantly, add it to the app not the render_app. --- crates/bevy_pbr/src/light_probe/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_pbr/src/light_probe/mod.rs b/crates/bevy_pbr/src/light_probe/mod.rs index bfce2f1e26..82035be2f6 100644 --- a/crates/bevy_pbr/src/light_probe/mod.rs +++ b/crates/bevy_pbr/src/light_probe/mod.rs @@ -343,7 +343,8 @@ impl Plugin for LightProbePlugin { app.register_type::() .register_type::() - .register_type::(); + .register_type::() + .add_plugins(ExtractInstancesPlugin::::new()); } fn finish(&self, app: &mut App) { @@ -352,7 +353,6 @@ impl Plugin for LightProbePlugin { }; render_app - .add_plugins(ExtractInstancesPlugin::::new()) .init_resource::() .init_resource::() .add_systems(ExtractSchedule, gather_environment_map_uniform)