Errors when loading labled assets
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.13.2
## Relevant system information
SystemInfo { os: "Windows 10 Home", kernel: "19045", cpu: "13th Gen Intel(R) Core(TM) i5-13400F", core_count: "10", memory: "31.8 GiB" }
## What you did
I'm loading a texture atlas with the help of an xml file that was provided with the asset i'm using. I load it as a separate asset that has the `image` and the `TextureAtlasLayout` as labeled sub asset.
The image is loaded with
```rust
let mut image_context = load_context.begin_labeled_asset();
let image = image_context
.load_direct(image_path.clone())
.await?
.take::()
.ok_or(XMLTextureAtlasError::ImageGetError)?;
load_context.add_loaded_labeled_asset(
"image".to_string(),
image_context.finish(image, None),
);
```
And i create a new `TextureAtlasLayout` and add i with `load_context.add_labeled_asset("layout".to_string(), layout)`
I later load the assets as follows
```rust
let xml_atlas: Handle = asset_server.load("spritesheets/blueSheet.xml");
let texture_handle: Handle = asset_server.load("spritesheets/blueSheet.xml#image");
let texture_atlas_handle: Handle = asset_server.load("spritesheets/blueSheet.xml#layout");
```
## What went wrong
When i run the game I get these errors even though if i look at my game it seems to work as expected
```
2024-04-18T18:28:08.090218Z ERROR bevy_asset::server: Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("spritesheets/blueSheet.xml#layout");
2024-04-18T18:28:08.090218Z ERROR bevy_asset::server: Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("spritesheets/blueSheet.xml#image");
```
## Additional information
It seems like labled assets are not recognized properley in the path i'm giving to the load function. This is not a breaking issue but it could become a problem when your log get filled with error messages
Contributor guide
Assessment
This issue has not been assessed yet.