Nested subasset loads tries to return the root nested asset.
Open
A-Assets
C-Bug
S-Needs-Design
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
[ab0e3f8](https://github.com/bevyengine/bevy/commit/ab0e3f871452f6be5c99f18175a8949b8a19e2dd)
---
In an asset loader, do a nested immediate asset load where the path you provide is a subasset:
```rust
// This returns a type mismatch error since Gltf (the type of `some_asset.gltf`) does not match `Mesh`.
load_context.loader().immediate().load("some_asset.gltf#Mesh0/Primitive0").await;
```
This means if the type of a subasset matched the root asset, we would unknowingly be using the wrong asset!
Contributor guide
Assessment
This issue has not been assessed yet.