Skip to content

Commit 2080f34

Browse files
committed
fixed byte offset ubyte accessors
1 parent 39e747d commit 2080f34

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Runtime/Scripts/SceneExporter/ExporterAccessors.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public AccessorId ExportAccessor(byte[] arr)
415415
}
416416

417417
AlignToBoundary(_bufferWriter.BaseStream, 0x00);
418-
uint byteOffset = CalculateAlignment((uint)_bufferWriter.BaseStream.Position, 4);
418+
uint byteOffset = CalculateAlignment((uint)_bufferWriter.BaseStream.Position, 1);
419419

420420
accessor.ComponentType = GLTFComponentType.UnsignedByte;
421421

@@ -427,7 +427,7 @@ public AccessorId ExportAccessor(byte[] arr)
427427
accessor.Min = new List<double> { min };
428428
accessor.Max = new List<double> { max };
429429

430-
uint byteLength = CalculateAlignment((uint)_bufferWriter.BaseStream.Position - byteOffset, 4);
430+
uint byteLength = CalculateAlignment((uint)_bufferWriter.BaseStream.Position - byteOffset, 1);
431431

432432
accessor.BufferView = ExportBufferView(byteOffset, byteLength);
433433

0 commit comments

Comments
 (0)