This commit is contained in:
AmadeusWM
2025-04-05 21:11:04 +02:00
parent 4dd5b14ea1
commit 4a9dc86fc0
7 changed files with 15 additions and 6 deletions

View File

@@ -11,7 +11,11 @@ fn spawn_level(
models: Res<Assets<Gltf>>,
gltf_assets: Res<GltfAssets>
) {
let gltf = models.get(&gltf_assets.wall).unwrap();
println!("LIBRARY: {:?}", gltf_assets.library);
let jumbo = gltf_assets.library.get("meshes/library/wall.glb").unwrap();
let gltf = models.get(jumbo).unwrap();
commands.spawn(SceneRoot(gltf.scenes[0].clone()));
// commands.spawn(SceneRoot(gltf.scenes[0].clone()));
let asset = gltf.default_scene.as_ref().unwrap();
commands.spawn(SceneRoot(asset.clone()));
}