bevy/crates/bevy_pbr/src
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
..
render Use Affine3A for GlobalTransform to allow any affine transformation (#4379) 2022-07-16 00:51:12 +00:00
alpha.rs Derive default for enums where possible (#5158) 2022-07-01 03:42:15 +00:00
bundle.rs Visibilty Inheritance, universal ComputedVisibility and RenderLayers support (#5310) 2022-07-15 23:24:42 +00:00
lib.rs Visibilty Inheritance, universal ComputedVisibility and RenderLayers support (#5310) 2022-07-15 23:24:42 +00:00
light.rs Use Affine3A for GlobalTransform to allow any affine transformation (#4379) 2022-07-16 00:51:12 +00:00
material.rs update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
pbr_material.rs Don't panic when StandardMaterial normal_map hasn't loaded yet (#5307) 2022-07-16 21:50:19 +00:00
wireframe.rs fix extract_wireframes (#5301) 2022-07-13 04:53:50 +00:00