Skip to content

Commit e072625

Browse files
authored
Move ExtractInstancesPlugin<EnvironmentMapIds> 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.
1 parent 7b6c5f4 commit e072625

File tree

1 file changed

+2
-2
lines changed
  • crates/bevy_pbr/src/light_probe

1 file changed

+2
-2
lines changed

crates/bevy_pbr/src/light_probe/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ impl Plugin for LightProbePlugin {
343343

344344
app.register_type::<LightProbe>()
345345
.register_type::<EnvironmentMapLight>()
346-
.register_type::<IrradianceVolume>();
346+
.register_type::<IrradianceVolume>()
347+
.add_plugins(ExtractInstancesPlugin::<EnvironmentMapIds>::new());
347348
}
348349

349350
fn finish(&self, app: &mut App) {
@@ -352,7 +353,6 @@ impl Plugin for LightProbePlugin {
352353
};
353354

354355
render_app
355-
.add_plugins(ExtractInstancesPlugin::<EnvironmentMapIds>::new())
356356
.init_resource::<LightProbesBuffer>()
357357
.init_resource::<EnvironmentMapUniformBuffer>()
358358
.add_systems(ExtractSchedule, gather_environment_map_uniform)

0 commit comments

Comments
 (0)