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
@ -29,9 +29,11 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||||||
},
|
},
|
||||||
..default()
|
..default()
|
||||||
});
|
});
|
||||||
|
|
||||||
// a barebones scene containing one of each gltf_extra type
|
// a barebones scene containing one of each gltf_extra type
|
||||||
commands.spawn(SceneBundle {
|
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()
|
..default()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user