bevy/crates/bevy_asset/src
Torstein Grindvik 7132404b38
Add note about asset source register order (#10186)
# Objective

I encountered a problem where I had a plugin `FooPlugin` which did

```rust
impl Plugin for FooPlugin {
    fn build(&self, app: &mut App) {
        app
           .register_asset_source(...); // more stuff after
    }
}
```

And when I tried using it, e.g.

```rust
asset_server.load("foo://data/asset.custom");
```

I got an error that `foo` was not recognized as a source.

I found that this is because asset sources must be registered _before_
`AssetPlugin` is added, and I had `FooPlugin` _after_.

## Solution

Add clarifying note about having to register sources before
`AssetPlugin` is added.

Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
Co-authored-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
2023-10-20 14:43:16 +00:00
..
io remove unused import on android (#10197) 2023-10-19 23:02:04 +00:00
processor Multiple Asset Sources (#9885) 2023-10-13 23:17:32 +00:00
server Return an error when loading non-existent labels (#9751) 2023-10-15 18:36:51 +00:00
assets.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
event.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
folder.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
handle.rs Asset v2: Asset path serialization fix (#9756) 2023-09-13 05:43:01 +00:00
id.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
lib.rs Add note about asset source register order (#10186) 2023-10-20 14:43:16 +00:00
loader.rs Multiple Asset Sources (#9885) 2023-10-13 23:17:32 +00:00
meta.rs Removed anyhow (#10003) 2023-10-06 07:20:13 +00:00
path.rs Return an error when loading non-existent labels (#9751) 2023-10-15 18:36:51 +00:00
reflect.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
saver.rs Removed anyhow (#10003) 2023-10-06 07:20:13 +00:00