From 9f1207cfa987d54c50c5fcc450a9b12e1e5ae98d Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 14 Oct 2021 18:45:14 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=84=E3=81=A1=E3=81=8A=E3=81=86=20byte=20?= =?UTF-8?q?=E5=9E=8B=E3=82=82=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM10/Runtime/Migration/MeshUpdater.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/VRM10/Runtime/Migration/MeshUpdater.cs b/Assets/VRM10/Runtime/Migration/MeshUpdater.cs index d6b62d08b..3756b3257 100644 --- a/Assets/VRM10/Runtime/Migration/MeshUpdater.cs +++ b/Assets/VRM10/Runtime/Migration/MeshUpdater.cs @@ -79,6 +79,18 @@ namespace UniVRM10 SpanLike indices; switch (mesh.IndexBuffer.Stride) { + case 1: + { + // byte + var ushort_indices = mesh.IndexBuffer.GetSpan(); + indices = SpanLike.Create(ushort_indices.Length); + for (int i = 0; i < ushort_indices.Length; ++i) + { + indices[i] = ushort_indices[i]; + } + break; + } + case 2: { // ushort