bevyengine / bevyengine/bevy

Nested subasset loads tries to return the root nested asset.

Open
#18,291 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.