bevy/crates/bevy_asset
Nathan Ward e549f14359 [assets] properly set LoadState with invalid asset extension (#2318)
# Objective

- Currently, when calling any of the `AssetServer`'s `load` functions, if the extension does not exist for the given path, the returned handle's load state is always `LoadState::NotLoaded`. 
- This is due to the `load_async` function early returning without properly creating a `SourceInfo` for the requested asset.
- Fixes #2261

## Solution
- Add the `SourceInfo` prior to checking for valid extension loaders. And set the `LoadState` to `Failed` if the according loader does not exist.
2021-06-08 19:39:59 +00:00
..
src [assets] properly set LoadState with invalid asset extension (#2318) 2021-06-08 19:39:59 +00:00
Cargo.toml [assets] set LoadState properly and more testing! (#2226) 2021-06-08 02:46:44 +00:00