mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 03:23:20 +00:00
c7298599ee
# Objective - Closes #11954 ## Solution Change the load_meshes field in `GltfLoaderSettings` from a bool to `RenderAssetUsages` flag, and add a new load_materials flag. Use these to determine where the gLTF mesh and material assets are retained in memory (if the provided flags are empty, then the assets are skipped during load). --- ## Migration Guide When loading gLTF assets with `asset_server.load_with_settings`, use `RenderAssetUsages` instead of `bool` when setting load_meshes e.g. ```rust let _ = asset_server.load_with_settings("...", |s: &mut GltfLoaderSettings| { s.load_meshes = RenderAssetUsages::RENDER_WORLD; }); ``` Use the new load_materials field for controlling material load & retention behaviour instead of load_meshes. gLTF .meta files need similar updates e.g ``` load_meshes: true, ``` to ``` load_meshes: ("MAIN_WORLD | RENDER_WORLD"), ``` --------- Co-authored-by: 66OJ66 <hi0obxud@anonaddy.me> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |