Fix pipeline initialisation of wireframe mode (fixes #1609) (#1623)

More details are in the associated issue #1609.

While looking for the source of this issue, I've noticed that the `set` and `set_untracked` methods aren't really DRY:
68606934e3/crates/bevy_asset/src/assets.rs (L76-L85)

68606934e3/crates/bevy_asset/src/assets.rs (L91-L99)

Shouldn't `set` call `set_untracked`? Also, given the bug that arose from a misusage of these functions, maybe some refactoring is needed?
This commit is contained in:
Simon Guillot 2021-03-12 22:12:07 +00:00
parent 03601db51c
commit 785aad92f4

View File

@ -33,7 +33,7 @@ impl Plugin for WireframePlugin {
let mut pipelines = world
.get_resource_mut::<Assets<PipelineDescriptor>>()
.unwrap();
pipelines.set(
pipelines.set_untracked(
WIREFRAME_PIPELINE_HANDLE,
pipeline::build_wireframe_pipeline(&mut shaders),
);