Better error message for mismatched handle types
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
I've seen a couple of users run into errors like these:
`Requested handle of type TypeId { t: 201640482042465126479302603612250925020 } for asset 'ship.gltf' does not match actual asset type 'bevy_gltf::Gltf', which used loader 'bevy_gltf::loader::GltfLoader'`
`assertion left == right failed: The target AssetId's TypeId does not match the TypeId of this UntypedAssetId
left: TypeId { t: 27553811827391490898130069402547565260 }
right: TypeId { t: 189582940862555916391852589716973810489 }`
What's happening is they load a whole GLTF file or scene and try to use it somewhere a single Handle is expected, instead of loading the mesh subasset of the GLTF file.
We should improve these error messages to ask users to double check what type of asset is expected.
Contributor guide
Assessment
This issue has not been assessed yet.