diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs index 9c7cdd3e0..71ce55e5f 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs @@ -475,10 +475,10 @@ namespace UniGLTF return new SpanLike(bytes, Marshal.SizeOf(), getset.Getter, getset.Setter); } - public static SpanLike Create(int count) where T : struct + public static SpanLike Create(int itemCount) where T : struct { var itemSize = Marshal.SizeOf(); - var array = new byte[count / itemSize]; + var array = new byte[itemCount * itemSize]; return Wrap(new ArraySegment(array)); }