bevy/crates/bevy_asset/src
François 86e2fc53d0 improve error message when asset type hasn't beed added to app (#1487)
Error message noticed in #1475 

When an asset type hasn't been added to the app but a load was attempted, the error message wasn't helpful:
```
thread 'IO Task Pool (0)' panicked at 'Failed to find AssetLifecycle for label Some("Mesh0/Primitive0"), which has an asset type 8ecbac0f-f545-4473-ad43-e1f4243af51e. Are you sure that is a registered asset type?', /.cargo/git/checkouts/bevy-f7ffde730c324c74/89a41bc/crates/bevy_asset/src/asset_server.rs:435:17
```
means that 
```rust
.add_asset::<bevy::render::prelude::Mesh>()
```
needs to be added.

* type name was not given, only UUID, which may make it hard to identify type across bevy/plugins
* instruction were not helpful as the `register_asset_type` method is not public

new error message:
```
thread 'IO Task Pool (1)' panicked at 'Failed to find AssetLifecycle for label 'Some("Mesh0/Primitive0")', which has an asset type "bevy_render::mesh::mesh::Mesh" (UUID 8ecbac0f-f545-4473-ad43-e1f4243af51e). Are you sure this asset type has been added to your app builder?', /bevy/crates/bevy_asset/src/asset_server.rs:435:17
```
2021-03-14 00:36:15 +00:00
..
diagnostic Bevy ECS V2 (#1525) 2021-03-05 07:54:35 +00:00
io Bevy ECS V2 (#1525) 2021-03-05 07:54:35 +00:00
asset_server.rs improve error message when asset type hasn't beed added to app (#1487) 2021-03-14 00:36:15 +00:00
assets.rs Small improvement of code quality of Assets::set* methods (#1649) 2021-03-14 00:19:44 +00:00
filesystem_watcher.rs format comments (#1612) 2021-03-11 00:27:30 +00:00
handle.rs format comments (#1612) 2021-03-11 00:27:30 +00:00
info.rs Bevy Reflection (#926) 2020-11-27 16:39:59 -08:00
lib.rs format comments (#1612) 2021-03-11 00:27:30 +00:00
loader.rs Bevy ECS V2 (#1525) 2021-03-05 07:54:35 +00:00
path.rs Fix errors and panics to typical Rust conventions (#968) 2020-12-02 11:31:16 -08:00