From bccad49a272096ad89dff59cd5429282d605d836 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 10 Feb 2022 18:53:18 +0900 Subject: [PATCH] GLTF to Gltf --- .../Runtime/UniGLTF/IO/ExportingGltfData.cs | 34 +++++++++--------- Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs | 2 +- .../UniGLTF/IO/MeshIO/BlendShapeExporter.cs | 4 +-- .../UniGLTF/IO/MeshIO/MeshExportUtil.cs | 2 +- .../MeshIO/MeshExporter_SharedVertexBuffer.cs | 2 +- .../IO/TextureIO/GltfTextureExporter.cs | 12 +++---- .../Runtime/UniGLTF/IO/gltfExporter.cs | 2 +- .../UniGLTF/EditorTextureSerializerTests.cs | 2 +- .../UniGLTF/Tests/UniGLTF/GlbParserTests.cs | 2 +- Assets/UniGLTF/Tests/UniGLTF/MeshTests.cs | 4 +-- Assets/UniGLTF/Tests/UniGLTF/UniGLTFTests.cs | 18 +++++----- .../Tests/SampleTests/VRMImportExportTests.cs | 2 +- .../VRM10/Runtime/IO/BufferAccessorAdapter.cs | 6 ++-- Assets/VRM10/Runtime/IO/Vrm10Exporter.cs | 36 +++++++++---------- 14 files changed, 64 insertions(+), 64 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ExportingGltfData.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ExportingGltfData.cs index f73f43e2d..50cfef3d9 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ExportingGltfData.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ExportingGltfData.cs @@ -7,7 +7,7 @@ namespace UniGLTF { public class ExportingGltfData { - public glTF GLTF { get; } = new glTF(); + public glTF Gltf { get; } = new glTF(); protected IBytesBuffer _buffer; /// @@ -23,7 +23,7 @@ namespace UniGLTF } // buffers[0] is export target - GLTF.buffers.Add(new glTFBuffer()); + Gltf.buffers.Add(new glTFBuffer()); _buffer = new ArrayByteBuffer(new byte[reserved]); } @@ -31,7 +31,7 @@ namespace UniGLTF public glTFBufferView ExtendBufferAndGetView(ArraySegment segment, glBufferTarget target) where T : struct { var view = _buffer.Extend(segment, target); - GLTF.buffers[0].byteLength = _buffer.Bytes.Count; + Gltf.buffers[0].byteLength = _buffer.Bytes.Count; return view; } @@ -44,8 +44,8 @@ namespace UniGLTF return -1; } var view = ExtendBufferAndGetView(array, target); - var viewIndex = GLTF.bufferViews.Count; - GLTF.bufferViews.Add(view); + var viewIndex = Gltf.bufferViews.Count; + Gltf.bufferViews.Add(view); return viewIndex; } @@ -67,10 +67,10 @@ namespace UniGLTF var viewIndex = ExtendBufferAndGetViewIndex(array, target); // index buffer's byteStride is unnecessary - GLTF.bufferViews[viewIndex].byteStride = 0; + Gltf.bufferViews[viewIndex].byteStride = 0; - var accessorIndex = GLTF.accessors.Count; - GLTF.accessors.Add(new glTFAccessor + var accessorIndex = Gltf.accessors.Count; + Gltf.accessors.Add(new glTFAccessor { bufferView = viewIndex, byteOffset = 0, @@ -111,8 +111,8 @@ namespace UniGLTF return -1; } var sparseValuesViewIndex = ExtendBufferAndGetViewIndex(sparseValues, target); - var accessorIndex = GLTF.accessors.Count; - GLTF.accessors.Add(new glTFAccessor + var accessorIndex = Gltf.accessors.Count; + Gltf.accessors.Add(new glTFAccessor { byteOffset = 0, componentType = glTFExtensions.GetComponentType(), @@ -144,8 +144,8 @@ namespace UniGLTF public int AppendToBuffer(ArraySegment segment) { var gltfBufferView = _buffer.Extend(segment); - var viewIndex = GLTF.bufferViews.Count; - GLTF.bufferViews.Add(gltfBufferView); + var viewIndex = Gltf.bufferViews.Count; + Gltf.bufferViews.Add(gltfBufferView); return viewIndex; } @@ -159,7 +159,7 @@ namespace UniGLTF public byte[] ToGlbBytes() { var f = new JsonFormatter(); - GltfSerializer.Serialize(f, GLTF); + GltfSerializer.Serialize(f, Gltf); var json = f.ToString().ParseAsJson().ToString(" "); @@ -188,10 +188,10 @@ namespace UniGLTF public (string, glTFBuffer) ToGltf(string gltfPath) { // fix buffer path - if (GLTF.buffers.Count == 1) + if (Gltf.buffers.Count == 1) { var withoutExt = Path.GetFileNameWithoutExtension(gltfPath); - GLTF.buffers[0].uri = $"{withoutExt}.bin"; + Gltf.buffers[0].uri = $"{withoutExt}.bin"; } else { @@ -199,12 +199,12 @@ namespace UniGLTF } var f = new JsonFormatter(); - GltfSerializer.Serialize(f, GLTF); + GltfSerializer.Serialize(f, Gltf); var json = f.ToString().ParseAsJson().ToString(" "); json = GltfJsonUtil.FindUsedExtensionsAndUpdateJson(json); - return (json, GLTF.buffers[0]); + return (json, Gltf.buffers[0]); } #endregion } diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs index 123d5ff50..ff35786c3 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/GltfData.cs @@ -92,7 +92,7 @@ namespace UniGLTF public static GltfData CreateFromExportForTest(ExportingGltfData data) { - return CreateFromGltfDataForTest(data.GLTF, data.BinBytes); + return CreateFromGltfDataForTest(data.Gltf, data.BinBytes); } public static GltfData CreateFromGltfDataForTest(glTF gltf, ArraySegment bytes) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs index 205b630ed..8276891ba 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/BlendShapeExporter.cs @@ -74,8 +74,8 @@ namespace UniGLTF { // position var positionAccessorIndex = data.ExtendBufferAndGetAccessorIndex(positions, glBufferTarget.ARRAY_BUFFER); - data.GLTF.accessors[positionAccessorIndex].min = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Min(a.x, b.x), Math.Min(a.y, b.y), Mathf.Min(a.z, b.z))).ToArray(); - data.GLTF.accessors[positionAccessorIndex].max = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Max(a.x, b.x), Math.Max(a.y, b.y), Mathf.Max(a.z, b.z))).ToArray(); + data.Gltf.accessors[positionAccessorIndex].min = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Min(a.x, b.x), Math.Min(a.y, b.y), Mathf.Min(a.z, b.z))).ToArray(); + data.Gltf.accessors[positionAccessorIndex].max = positions.Aggregate(positions[0], (a, b) => new Vector3(Mathf.Max(a.x, b.x), Math.Max(a.y, b.y), Mathf.Max(a.z, b.z))).ToArray(); // normal var normalAccessorIndex = -1; diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportUtil.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportUtil.cs index 2013a1467..e796b4fb2 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportUtil.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExportUtil.cs @@ -115,7 +115,7 @@ namespace UniGLTF var indicesAccessorIndex = data.ExtendBufferAndGetAccessorIndex(indices.Select(x => (uint)m_vertexIndexMap[x]).ToArray(), glBufferTarget.ELEMENT_ARRAY_BUFFER); var positions = m_positions.ToArray(); var positionAccessorIndex = data.ExtendBufferAndGetAccessorIndex(positions, glBufferTarget.ARRAY_BUFFER); - AccessorsBounds.UpdatePositionAccessorsBounds(data.GLTF.accessors[positionAccessorIndex], positions); + AccessorsBounds.UpdatePositionAccessorsBounds(data.Gltf.accessors[positionAccessorIndex], positions); var normals = m_normals.ToArray(); var normalAccessorIndex = data.ExtendBufferAndGetAccessorIndex(normals, glBufferTarget.ARRAY_BUFFER); diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_SharedVertexBuffer.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_SharedVertexBuffer.cs index 00af168eb..e1885be1f 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_SharedVertexBuffer.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MeshIO/MeshExporter_SharedVertexBuffer.cs @@ -32,7 +32,7 @@ namespace UniGLTF var materials = unityMesh.Materials; var positions = mesh.vertices.Select(axisInverter.InvertVector3).ToArray(); var positionAccessorIndex = data.ExtendBufferAndGetAccessorIndex(positions, glBufferTarget.ARRAY_BUFFER); - AccessorsBounds.UpdatePositionAccessorsBounds(data.GLTF.accessors[positionAccessorIndex], positions); + AccessorsBounds.UpdatePositionAccessorsBounds(data.Gltf.accessors[positionAccessorIndex], positions); var normalAccessorIndex = data.ExtendBufferAndGetAccessorIndex(mesh.normals.Select(y => axisInverter.InvertVector3(y.normalized)).ToArray(), glBufferTarget.ARRAY_BUFFER); diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureExporter.cs index 603a94c2c..055821d81 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/GltfTextureExporter.cs @@ -30,8 +30,8 @@ namespace UniGLTF var viewIndex = data.ExtendBufferAndGetViewIndex(bytesWithMime.bytes); // add image - var imageIndex = data.GLTF.images.Count; - data.GLTF.images.Add(new glTFImage + var imageIndex = data.Gltf.images.Count; + data.Gltf.images.Add(new glTFImage { name = TextureImportName.RemoveSuffix(texture.name), bufferView = viewIndex, @@ -39,13 +39,13 @@ namespace UniGLTF }); // add sampler - var samplerIndex = data.GLTF.samplers.Count; + var samplerIndex = data.Gltf.samplers.Count; var sampler = TextureSamplerUtil.Export(texture); - data.GLTF.samplers.Add(sampler); + data.Gltf.samplers.Add(sampler); // add texture - var textureIndex = data.GLTF.textures.Count; - data.GLTF.textures.Add(new glTFTexture + var textureIndex = data.Gltf.textures.Count; + data.Gltf.textures.Add(new glTFTexture { sampler = samplerIndex, source = imageIndex, diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs index e9014d5d1..28b97b39c 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/gltfExporter.cs @@ -12,7 +12,7 @@ namespace UniGLTF { protected ExportingGltfData _data; - protected glTF _gltf => _data.GLTF; + protected glTF _gltf => _data.Gltf; public GameObject Copy { diff --git a/Assets/UniGLTF/Tests/UniGLTF/EditorTextureSerializerTests.cs b/Assets/UniGLTF/Tests/UniGLTF/EditorTextureSerializerTests.cs index 349db71fd..a72c42b24 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/EditorTextureSerializerTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/EditorTextureSerializerTests.cs @@ -134,7 +134,7 @@ namespace UniGLTF exporter.Prepare(root); exporter.Export(new EditorTextureSerializer()); } - var gltf = data.GLTF; + var gltf = data.Gltf; Assert.AreEqual(1, gltf.images.Count); var exportedImage = gltf.images[0]; Assert.AreEqual("image/png", exportedImage.mimeType); diff --git a/Assets/UniGLTF/Tests/UniGLTF/GlbParserTests.cs b/Assets/UniGLTF/Tests/UniGLTF/GlbParserTests.cs index 22034d331..0894b3b37 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/GlbParserTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/GlbParserTests.cs @@ -11,7 +11,7 @@ namespace UniGLTF public void TextureNameUniqueness() { var data = new ExportingGltfData(); - var gltf = data.GLTF; + var gltf = data.Gltf; gltf.asset.version = "2.0"; gltf.textures.Add(new glTFTexture { diff --git a/Assets/UniGLTF/Tests/UniGLTF/MeshTests.cs b/Assets/UniGLTF/Tests/UniGLTF/MeshTests.cs index 5af60274e..5a8c0d48a 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/MeshTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/MeshTests.cs @@ -139,7 +139,7 @@ namespace UniGLTF : MeshExporter_SharedVertexBuffer.Export(data, unityMesh, Materials, axisInverter, meshExportSettings) ; - using (var parsed = GltfData.CreateFromGltfDataForTest(data.GLTF, data.BinBytes)) + using (var parsed = GltfData.CreateFromGltfDataForTest(data.Gltf, data.BinBytes)) { { @@ -190,7 +190,7 @@ namespace UniGLTF : MeshExporter_SharedVertexBuffer.Export(data, unityMesh, Materials, axisInverter, meshExportSettings) ; - using (var parsed = GltfData.CreateFromGltfDataForTest(data.GLTF, data.BinBytes)) + using (var parsed = GltfData.CreateFromGltfDataForTest(data.Gltf, data.BinBytes)) { { var indices = parsed.GetIndices(gltfMesh.primitives[0].indices); diff --git a/Assets/UniGLTF/Tests/UniGLTF/UniGLTFTests.cs b/Assets/UniGLTF/Tests/UniGLTF/UniGLTFTests.cs index dd39a0fcf..f2bccab68 100644 --- a/Assets/UniGLTF/Tests/UniGLTF/UniGLTFTests.cs +++ b/Assets/UniGLTF/Tests/UniGLTF/UniGLTFTests.cs @@ -109,9 +109,9 @@ namespace UniGLTF exporter.Export(new EditorTextureSerializer()); // remove empty buffer - data.GLTF.buffers.Clear(); + data.Gltf.buffers.Clear(); - json = data.GLTF.ToJson(); + json = data.Gltf.ToJson(); } // parse @@ -141,7 +141,7 @@ namespace UniGLTF data.ExtendBufferAndGetView(bytes, glBufferTarget.NONE); } - Assert.AreEqual(values.Count, data.GLTF.buffers[0].byteLength); + Assert.AreEqual(values.Count, data.Gltf.buffers[0].byteLength); Assert.True(Enumerable.SequenceEqual(values, data.BinBytes.ToArray())); } @@ -299,7 +299,7 @@ namespace UniGLTF exporter.Export(new EditorTextureSerializer()); } - var expected = data.GLTF.ToJson().ParseAsJson(); + var expected = data.Gltf.ToJson().ParseAsJson(); expected.AddKey(Utf8String.From("meshes")); expected.AddValue(default(ArraySegment), ValueNodeType.Array); expected["meshes"].AddValue(default(ArraySegment), ValueNodeType.Object); @@ -333,7 +333,7 @@ namespace UniGLTF primitive["targets"][1].AddKey(Utf8String.From("TANGENT")); primitive["targets"][1].AddValue(Utf8String.From("0").Bytes, ValueNodeType.Integer); - data.GLTF.meshes.Add(new glTFMesh("test") + data.Gltf.meshes.Add(new glTFMesh("test") { primitives = new List { @@ -361,7 +361,7 @@ namespace UniGLTF } } }); - var actual = data.GLTF.ToJson().ParseAsJson(); + var actual = data.Gltf.ToJson().ParseAsJson(); Assert.AreEqual(expected, actual); } @@ -528,7 +528,7 @@ namespace UniGLTF // export var data = new ExportingGltfData(); - var gltf = data.GLTF; + var gltf = data.Gltf; var json = default(string); using (var exporter = new gltfExporter(data, new GltfExportSettings())) { @@ -606,7 +606,7 @@ namespace UniGLTF // export var data = new ExportingGltfData(); - var gltf = data.GLTF; + var gltf = data.Gltf; string json; using (var exporter = new gltfExporter(data, new GltfExportSettings())) { @@ -669,7 +669,7 @@ namespace UniGLTF // export var data = new ExportingGltfData(); - var gltf = data.GLTF; + var gltf = data.Gltf; string json; using (var exporter = new gltfExporter(data, new GltfExportSettings())) { diff --git a/Assets/VRM/Tests/SampleTests/VRMImportExportTests.cs b/Assets/VRM/Tests/SampleTests/VRMImportExportTests.cs index 95b081ba5..3b57264ba 100644 --- a/Assets/VRM/Tests/SampleTests/VRMImportExportTests.cs +++ b/Assets/VRM/Tests/SampleTests/VRMImportExportTests.cs @@ -169,7 +169,7 @@ namespace VRM.Samples // TODO: Check contents in JSON /*var exportJson = */ - JsonParser.Parse(vrm.GLTF.ToJson()); + JsonParser.Parse(vrm.Gltf.ToJson()); // TODO: Check contents in JSON /*var newExportedJson = */ diff --git a/Assets/VRM10/Runtime/IO/BufferAccessorAdapter.cs b/Assets/VRM10/Runtime/IO/BufferAccessorAdapter.cs index 17c3d91ab..2b403e3c0 100644 --- a/Assets/VRM10/Runtime/IO/BufferAccessorAdapter.cs +++ b/Assets/VRM10/Runtime/IO/BufferAccessorAdapter.cs @@ -64,7 +64,7 @@ namespace UniVRM10 Action, glTFAccessor> minMax = null, int offset = 0, int count = 0) { - var gltf = data.GLTF; + var gltf = data.Gltf; var accessorIndex = gltf.accessors.Count; var accessor = self.CreateGltfAccessor(viewIndex, count, offset * self.Stride); if (minMax != null) @@ -119,7 +119,7 @@ namespace UniVRM10 var sparseIndexView = data.AppendToBuffer(sparseIndexBin); var sparseValueView = data.AppendToBuffer(sparseValueBin); - var accessorIndex = data.GLTF.accessors.Count; + var accessorIndex = data.Gltf.accessors.Count; var accessor = new glTFAccessor { componentType = (glComponentType)self.ComponentType, @@ -144,7 +144,7 @@ namespace UniVRM10 { minMax(sparseValueBin, accessor); } - data.GLTF.accessors.Add(accessor); + data.Gltf.accessors.Add(accessor); return accessorIndex; } } diff --git a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs index d529d5624..53fb1847a 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs @@ -36,12 +36,12 @@ namespace UniVRM10 throw new ArgumentException(nameof(textureSerializer)); } - Storage.GLTF.extensionsUsed.Add(glTF_KHR_texture_transform.ExtensionName); - Storage.GLTF.extensionsUsed.Add(UniGLTF.Extensions.VRMC_vrm.VRMC_vrm.ExtensionName); - Storage.GLTF.extensionsUsed.Add(glTF_KHR_materials_unlit.ExtensionName); - Storage.GLTF.extensionsUsed.Add(UniGLTF.Extensions.VRMC_materials_mtoon.VRMC_materials_mtoon.ExtensionName); - Storage.GLTF.extensionsUsed.Add(UniGLTF.Extensions.VRMC_springBone.VRMC_springBone.ExtensionName); - Storage.GLTF.extensionsUsed.Add(UniGLTF.Extensions.VRMC_node_constraint.VRMC_node_constraint.ExtensionName); + Storage.Gltf.extensionsUsed.Add(glTF_KHR_texture_transform.ExtensionName); + Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_vrm.VRMC_vrm.ExtensionName); + Storage.Gltf.extensionsUsed.Add(glTF_KHR_materials_unlit.ExtensionName); + Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_materials_mtoon.VRMC_materials_mtoon.ExtensionName); + Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_springBone.VRMC_springBone.ExtensionName); + Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_node_constraint.VRMC_node_constraint.ExtensionName); m_textureSerializer = textureSerializer; m_textureExporter = new TextureExporter(m_textureSerializer); @@ -166,36 +166,36 @@ namespace UniVRM10 public void Export(GameObject root, Model model, ModelExporter converter, ExportArgs option, VRM10ObjectMeta vrmMeta = null) { - Storage.GLTF.asset = ExportAsset(model); + Storage.Gltf.asset = ExportAsset(model); Storage.Reserve(CalcReserveBytes(model)); foreach (var material in ExportMaterials(model, m_textureExporter, m_settings)) { - Storage.GLTF.materials.Add(material); + Storage.Gltf.materials.Add(material); } foreach (var mesh in ExportMeshes(model.MeshGroups, model.Materials, Storage, option)) { - Storage.GLTF.meshes.Add(mesh); + Storage.Gltf.meshes.Add(mesh); } foreach (var (node, skin) in ExportNodes(model.Nodes, model.MeshGroups, Storage, option)) { - Storage.GLTF.nodes.Add(node); + Storage.Gltf.nodes.Add(node); if (skin != null) { - var skinIndex = Storage.GLTF.skins.Count; - Storage.GLTF.skins.Add(skin); + var skinIndex = Storage.Gltf.skins.Count; + Storage.Gltf.skins.Add(skin); node.skin = skinIndex; } } - Storage.GLTF.scenes.Add(new gltfScene() + Storage.Gltf.scenes.Add(new gltfScene() { nodes = model.Root.Children.Select(child => model.Nodes.IndexOfThrow(child)).ToArray() }); - var (vrm, vrmSpringBone, thumbnailTextureIndex) = ExportVrm(root, model, converter, vrmMeta, Storage.GLTF.nodes, m_textureExporter); + var (vrm, vrmSpringBone, thumbnailTextureIndex) = ExportVrm(root, model, converter, vrmMeta, Storage.Gltf.nodes, m_textureExporter); // Extension で Texture が増える場合があるので最後に呼ぶ var exportedTextures = m_textureExporter.Export(); @@ -207,18 +207,18 @@ namespace UniVRM10 if (thumbnailTextureIndex.HasValue) { - vrm.Meta.ThumbnailImage = Storage.GLTF.textures[thumbnailTextureIndex.Value].source; + vrm.Meta.ThumbnailImage = Storage.Gltf.textures[thumbnailTextureIndex.Value].source; } - UniGLTF.Extensions.VRMC_vrm.GltfSerializer.SerializeTo(ref Storage.GLTF.extensions, vrm); + UniGLTF.Extensions.VRMC_vrm.GltfSerializer.SerializeTo(ref Storage.Gltf.extensions, vrm); if (vrmSpringBone != null) { - UniGLTF.Extensions.VRMC_springBone.GltfSerializer.SerializeTo(ref Storage.GLTF.extensions, vrmSpringBone); + UniGLTF.Extensions.VRMC_springBone.GltfSerializer.SerializeTo(ref Storage.Gltf.extensions, vrmSpringBone); } // Fix Duplicated name - gltfExporter.FixName(Storage.GLTF); + gltfExporter.FixName(Storage.Gltf); }