bevyengine / bevyengine/bevy

Improve error message when trying to load glb file without label

Open
#20,786 1 comment 1 reaction 0 assignees View on GitHub
A-glTF C-Usability D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version and features

- main (cbf989c9dab5ce8152ab9407e0d4cb42b0138003)

## What you did

Attempting to load a glb without a label:

```rust
commands.spawn(SceneRoot(asset_server.load("out.glb")));
```

## What went wrong

Results in this error message:

```
ERROR bevy_asset::server: Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("out.glb");
```

which makes it sound glb files aren't supported. We ran into this issue on Discord https://discord.com/channels/691052431525675048/692572690833473578/1410977714302746854 and we confusingly thought it was something to do with the newly introduced web assets.

The fix is easy, just add `#Scene0` to the url or use [GltfAssetLabel](https://docs.rs/bevy/latest/bevy/gltf/prelude/enum.GltfAssetLabel.html) which would be useful as a suggestion in the error message.

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.