The `asset_processor` feature in 0.14 & 0.15 causes problems with GLTF loading.
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.14. It worked in 0.13.
## \[Optional\] Relevant system information
`SystemInfo { os: "Linux 24.04 Ubuntu", kernel: "6.8.0-36-generic", cpu: "AMD Ryzen 9 7950X 16-Core Processor", core_count: "16", memory: "30.6 GiB" }
`
## What you did
Enabled Asset pre-processing.
1. Enabled feature `bevy/asset_processor`.
2. Set `AssetMode::Processed` mode in `AssetPlugin`.
## What went wrong
A GLTF model is only loaded and rendered on the first run. Running the app again the GLTF model doesn't load/render. No errors are displayed in the console.
## Additional information
For the first run there was no `.meta` files in `./assets/` for any assets (.gltf, .bin, .jpg files) and no `./imported_assets` folder.
After the first run, the Asset processor has created default `.meta` files and created `./imported_assets`.
When trying to run it again (tried a few times), the GLTF model doesn't load.
Disabling the `bevy/asset_processor` feature flag (but still using `AssetMode::Processed`) makes the app load the model each time (it is loaded from the `./imported_assets` folder, checked with `strace -e trace=file`).
Also if I delete only the `model.bin.meta` file in the `./assets` folder and try again the model is loaded. The model is only loaded if that `.meta` file is deleted.
See the `bevy_0.14` branch of `bevy_water`: https://github.com/Neopallium/bevy_water/tree/bevy_0.14
I used the `pirates` example for testing this (need to enable feature `asset_preprocessing`):
`cargo run --release --example pirates --features asset_preprocessing`
The `bevy_0.13` branch of `bevy_water` shows the same example working fine with the asset processor.
Contributor guide
Research direction
Start by running `cargo run --release --example pirates --features asset_preprocessing` on the Bevy 0.14 setup described in the issue, then compare the generated `model.bin.meta` and `./imported_assets` contents across runs. Use the `bevy_0.13` and `bevy_0.14` branches of `bevy_water` as comparison points. Done means the GLTF model loads and renders on repeated runs without manually deleting metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100