bevy/crates/bevy_pbr
Christopher Biscardi d4f8f88bb6 Don't panic when StandardMaterial normal_map hasn't loaded yet (#5307)
# Objective

[This unwrap()](de484c1e41/crates/bevy_pbr/src/pbr_material.rs (L195)) in pbr_material.rs will be hit if a StandardMaterial normal_map image has not finished loading, resulting in an error message that is hard to debug.

## Solution

~~This PR improves the error message including a potential indication of why the unwrap() could have panic'd by using expect() instead of unwrap().~~

This PR removes the panic by only proceeding if the image is found.

---

## Changelog

Don't panic when StandardMaterial normal_map images have not finished loading.
2022-07-16 21:50:19 +00:00
..
src Don't panic when StandardMaterial normal_map hasn't loaded yet (#5307) 2022-07-16 21:50:19 +00:00
Cargo.toml Allow unbatched render phases to use unstable sorts (#5049) 2022-06-23 10:52:49 +00:00