diff --git a/docfx/articles/en/gltf/0_82_glb_import.md b/docfx/articles/en/gltf/0_82_glb_import.md index 4350f6a7a..1046f9438 100644 --- a/docfx/articles/en/gltf/0_82_glb_import.md +++ b/docfx/articles/en/gltf/0_82_glb_import.md @@ -58,14 +58,8 @@ See `SimpleViewer` sample. ```cs GltfData Load(string path) { - var ext = Path.GetExtension(path).ToLower(); - switch(ext) - { - case ".glb": return new GlbFileParser(path).Parse(); - case ".gltf": return new GltfFileWithResourceFilesParser(path).Parse(); - case ".zip": return new ZipArchivedGltfFileParser(path).Parse(); - default: throw new Exception($"unknown: {ext}"); - } + // Detect type by file extension automatically + return new AutoGltfFileParser(path).Parse(); } ``` diff --git a/docfx/articles/ja/gltf/0_82_glb_import.md b/docfx/articles/ja/gltf/0_82_glb_import.md index e7dc93c9c..b5c0cfae7 100644 --- a/docfx/articles/ja/gltf/0_82_glb_import.md +++ b/docfx/articles/ja/gltf/0_82_glb_import.md @@ -58,14 +58,8 @@ GltfData Load(string path) ```cs GltfData Load(string path) { - var ext = Path.GetExtension(path).ToLower(); - switch(ext) - { - case ".glb": return new GlbFileParser(path).Parse(); - case ".gltf": return new GltfFileWithResourceFilesParser(path).Parse(); - case ".zip": return new ZipArchivedGltfFileParser(path).Parse(); - default: throw new Exception($"unknown: {ext}"); - } + // ファイル拡張子で自動判定します + return new AutoGltfFileParser(path).Parse(); } ```