diff --git a/assets/meshes/library/space2.glb b/assets/meshes/library/space2.glb new file mode 100644 index 0000000..0118e7c Binary files /dev/null and b/assets/meshes/library/space2.glb differ diff --git a/assets/space1.blend b/assets/space1.blend new file mode 100644 index 0000000..1b1cd4c Binary files /dev/null and b/assets/space1.blend differ diff --git a/assets/space2.blend b/assets/space2.blend new file mode 100644 index 0000000..4f4bdda Binary files /dev/null and b/assets/space2.blend differ diff --git a/src/asset_loading/mod.rs b/src/asset_loading/mod.rs index 04eba14..1d248f7 100644 --- a/src/asset_loading/mod.rs +++ b/src/asset_loading/mod.rs @@ -30,8 +30,6 @@ pub(crate) struct AudioAssets {} #[derive(AssetCollection, Resource, Clone)] pub(crate) struct GltfAssets { - #[asset(key = "house")] - pub(crate) house: Handle, #[asset(key = "library", collection(typed, mapped))] pub(crate) library: HashMap>, } diff --git a/src/level_instantiation/mod.rs b/src/level_instantiation/mod.rs index 4fa5333..275a175 100644 --- a/src/level_instantiation/mod.rs +++ b/src/level_instantiation/mod.rs @@ -12,10 +12,10 @@ fn spawn_level( gltf_assets: Res ) { println!("LIBRARY: {:?}", gltf_assets.library); - let jumbo = gltf_assets.library.get("meshes/library/wall.glb").unwrap(); - let gltf = models.get(jumbo).unwrap(); + let jumbo = gltf_assets.library.get("meshes/library/space2.glb").expect("Couldn't find object in library"); + let gltf = models.get(jumbo).expect("No model for space2"); // commands.spawn(SceneRoot(gltf.scenes[0].clone())); - let asset = gltf.default_scene.as_ref().unwrap(); + let asset = gltf.default_scene.as_ref().expect("No scene in space2"); commands.spawn(SceneRoot(asset.clone())); }