bevy/crates/bevy_asset
66OJ66 4e28fa255d
Log an error when registering an AssetSource after AssetPlugin has been built (#10202)
# Objective

- Provides actionable feedback when users encounter the error in
https://github.com/bevyengine/bevy/issues/10162
- Complements https://github.com/bevyengine/bevy/pull/10186

## Solution

- Log an error when registering an AssetSource after the AssetPlugin has
been built (via DefaultPlugins). This will let users know that their
registration order needs changing

The outputted error message will look like this:
```rust
ERROR bevy_asset::server: 'AssetSourceId::Name(test)' must be registered before `AssetPlugin` (typically added as part of `DefaultPlugins`)
```

---------

Co-authored-by: 66OJ66 <hi0obxud@anonaddy.me>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2023-10-20 14:42:47 +00:00
..
macros Fix unused variable warning for simple AssetV2 derives (#9961) 2023-09-29 08:08:13 +00:00
src Log an error when registering an AssetSource after AssetPlugin has been built (#10202) 2023-10-20 14:42:47 +00:00
Cargo.toml Multiple Asset Sources (#9885) 2023-10-13 23:17:32 +00:00