Skip to content

Commit

Permalink
fix: only init_resource() once for AmbientLight (#3853)
Browse files Browse the repository at this point in the history
# Objective

`PbrPlugin` calls `app.init_resource::<AmbientLight>()` twice. The second call won't do anything.

## Solution

Remove the second call.
  • Loading branch information
dataphract committed Feb 3, 2022
1 parent 5066427 commit b506c30
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crates/bevy_pbr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ impl Plugin for PbrPlugin {
.init_resource::<AmbientLight>()
.init_resource::<DirectionalLightShadowMap>()
.init_resource::<PointLightShadowMap>()
.init_resource::<AmbientLight>()
.init_resource::<VisiblePointLights>()
.add_system_to_stage(
CoreStage::PostUpdate,
Expand Down

0 comments on commit b506c30

Please sign in to comment.