Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - do not add plugin ExtractComponentPlugin twice for StandardMaterial #3502

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Dec 30, 2021

Objective

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:

.add_plugin(ExtractComponentPlugin::<Handle<StandardMaterial>>::default())

and through MaterialPlugin:
.add_plugin(MaterialPlugin::<StandardMaterial>::default())

.add_plugin(ExtractComponentPlugin::<Handle<M>>::default())

I removed the extra plugin

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Dec 30, 2021
@mockersf mockersf added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior and removed S-Needs-Triage This issue needs to be labelled labels Dec 30, 2021
@cart
Copy link
Member

cart commented Jan 1, 2022

bors r+

bors bot pushed a commit that referenced this pull request Jan 1, 2022
…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:
https://github.com/bevyengine/bevy/blob/1d0d8a3397bd6fc2c14d42ffd0668d2443748912/crates/bevy_pbr/src/lib.rs#L73
and through `MaterialPlugin`:
https://github.com/bevyengine/bevy/blob/1d0d8a3397bd6fc2c14d42ffd0668d2443748912/crates/bevy_pbr/src/lib.rs#L72
https://github.com/bevyengine/bevy/blob/1d0d8a3397bd6fc2c14d42ffd0668d2443748912/crates/bevy_pbr/src/material.rs#L183

I removed the extra plugin

Co-authored-by: François <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 1, 2022

@bors bors bot changed the title do not add plugin ExtractComponentPlugin twice for StandardMaterial [Merged by Bors] - do not add plugin ExtractComponentPlugin twice for StandardMaterial Jan 1, 2022
@bors bors bot closed this Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants