diff --git a/Assets/VRM10/Runtime/Migration/MeshUpdater.cs b/Assets/VRM10/Runtime/Migration/MeshUpdater.cs index 01fc05ef6..d0d808554 100644 --- a/Assets/VRM10/Runtime/Migration/MeshUpdater.cs +++ b/Assets/VRM10/Runtime/Migration/MeshUpdater.cs @@ -82,6 +82,7 @@ namespace UniVRM10 var uv = AddAccessor(mesh.VertexBuffer.TexCoords); var weights = AddAccessor(mesh.VertexBuffer.Weights); var joints = AddAccessor(mesh.VertexBuffer.Joints); + var color = AddAccessor(mesh.VertexBuffer.Colors); var morphTargets = new MorphAccessor[] { }; if (mesh.MorphTargets != null) @@ -99,7 +100,10 @@ namespace UniVRM10 gltfPrim.indices = AddAccessor(subIndices); gltfPrim.attributes.POSITION = position.Value; gltfPrim.attributes.NORMAL = normal.Value; + gltfPrim.attributes.TANGENT = -1; + gltfPrim.attributes.COLOR_0 = color.GetValueOrDefault(-1); gltfPrim.attributes.TEXCOORD_0 = uv.Value; + gltfPrim.attributes.TEXCOORD_1 = -1; gltfPrim.attributes.WEIGHTS_0 = weights.GetValueOrDefault(-1); gltfPrim.attributes.JOINTS_0 = joints.GetValueOrDefault(-1); foreach (var (gltfMorph, morph) in Enumerable.Zip(gltfPrim.targets, morphTargets, (l, r) => (l, r)))