diff --git a/crates/model_import/src/lib.rs b/crates/model_import/src/lib.rs index a2fb604e9e..d1e90b8266 100644 --- a/crates/model_import/src/lib.rs +++ b/crates/model_import/src/lib.rs @@ -323,7 +323,7 @@ fn material_filter_matches(filter: &MaterialFilter, mat: &PbrMaterialDesc) -> bo // } // } -pub const MODEL_EXTENSIONS: &[&str] = &["glb", "fbx", "obj", "x"]; +pub const MODEL_EXTENSIONS: &[&str] = &["glb", "gltf", "fbx", "obj", "x"]; /// `../[path]` pub fn dotdot_path(path: impl Into) -> RelativePathBuf { diff --git a/crates/model_import/src/model_crate.rs b/crates/model_import/src/model_crate.rs index b37cd21043..83e0e8ff99 100644 --- a/crates/model_import/src/model_crate.rs +++ b/crates/model_import/src/model_crate.rs @@ -254,8 +254,12 @@ impl ModelCrate { force_assimp: bool, resolve_texture: TextureResolver, ) -> anyhow::Result<()> { - let is_fbx = url.extension().unwrap_or_default() == "fbx"; - let is_glb = url.extension().unwrap_or_default() == "glb"; + let ext = url.extension(); + let ext = ext.as_deref(); + + let is_fbx = ext == Some("fbx"); + let is_glb = ext == Some("glb") || ext == Some("gltf"); + if force_assimp { crate::assimp::import_url(assets, url, self, resolve_texture).await?; } else if is_fbx {