mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
do not add plugin ExtractComponentPlugin twice for StandardMaterial (#3502)
# Objective - After updating #2988, all the examples started crashing with ``` thread 'main' panicked at 'Plugin "bevy_render::render_component::ExtractComponentPlugin<bevy_asset::handle::Handle<bevy_pbr::pbr_material::StandardMaterial>>" was already added', crates/bevy_app/src/app.rs:831:33 ``` ## Solution Plugin was added twice: directly:1d0d8a3397/crates/bevy_pbr/src/lib.rs (L73)
and through `MaterialPlugin`:1d0d8a3397/crates/bevy_pbr/src/lib.rs (L72)
1d0d8a3397/crates/bevy_pbr/src/material.rs (L183)
I removed the extra plugin Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
This commit is contained in:
parent
1d0d8a3397
commit
3ba711050f
1 changed files with 0 additions and 2 deletions
|
@ -38,7 +38,6 @@ use bevy_ecs::prelude::*;
|
|||
use bevy_reflect::TypeUuid;
|
||||
use bevy_render::{
|
||||
prelude::Color,
|
||||
render_component::ExtractComponentPlugin,
|
||||
render_graph::RenderGraph,
|
||||
render_phase::{sort_phase_system, AddRenderCommand, DrawFunctions},
|
||||
render_resource::{Shader, SpecializedPipelines},
|
||||
|
@ -70,7 +69,6 @@ impl Plugin for PbrPlugin {
|
|||
|
||||
app.add_plugin(MeshRenderPlugin)
|
||||
.add_plugin(MaterialPlugin::<StandardMaterial>::default())
|
||||
.add_plugin(ExtractComponentPlugin::<Handle<StandardMaterial>>::default())
|
||||
.init_resource::<AmbientLight>()
|
||||
.init_resource::<DirectionalLightShadowMap>()
|
||||
.init_resource::<PointLightShadowMap>()
|
||||
|
|
Loading…
Reference in a new issue