mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
update gltf example to use type-safe GltfAssetLabel::Scene
(#14218)
# Objective update the `load_gltf_extras.rs` example to the newest bevy api ## Solution uses the new type-safe code for loading the scene #0 from the gltf instead of a path suffix ## Testing the example runs as expected
This commit is contained in:
parent
d008227553
commit
57d05927d6
1 changed files with 3 additions and 1 deletions
|
@ -29,9 +29,11 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
},
|
||||
..default()
|
||||
});
|
||||
|
||||
// a barebones scene containing one of each gltf_extra type
|
||||
commands.spawn(SceneBundle {
|
||||
scene: asset_server.load("models/extras/gltf_extras.glb#Scene0"),
|
||||
scene: asset_server
|
||||
.load(GltfAssetLabel::Scene(0).from_asset("models/extras/gltf_extras.glb")),
|
||||
..default()
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue