From 301901d1294ce2af5b3bc48430ccde8877dba823 Mon Sep 17 00:00:00 2001 From: Seokyeol Kim Date: Tue, 18 Jun 2024 17:28:28 +0900 Subject: [PATCH 1/2] fix incorrect variable names when using the default BinaryWriter in ExporterAccessors --- Runtime/Scripts/SceneExporter/ExporterAccessors.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/Scripts/SceneExporter/ExporterAccessors.cs b/Runtime/Scripts/SceneExporter/ExporterAccessors.cs index 1c2edc415..111fc0dfc 100644 --- a/Runtime/Scripts/SceneExporter/ExporterAccessors.cs +++ b/Runtime/Scripts/SceneExporter/ExporterAccessors.cs @@ -254,10 +254,10 @@ private AccessorId ExportAccessorSwitchHandedness(Quaternion[] arr, bool invertL #else foreach (var vec in arr) { - _bufferWriter.Write(vect.x); - _bufferWriter.Write(vect.y); - _bufferWriter.Write(vect.z); - _bufferWriter.Write(vect.w); + _bufferWriter.Write(vec.x); + _bufferWriter.Write(vec.y); + _bufferWriter.Write(vec.z); + _bufferWriter.Write(vec.w); } #endif exportAccessorBufferWriteMarker.End(); From 421f401a3f6bac75929656bce7f275860be5bd4e Mon Sep 17 00:00:00 2001 From: Seokyeol Kim Date: Tue, 18 Jun 2024 17:37:22 +0900 Subject: [PATCH 2/2] change the comparison criterion between Vector3 values from approximate equality to exact equality when writing sparse accessors --- Runtime/Scripts/SceneExporter/ExporterAccessors.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Scripts/SceneExporter/ExporterAccessors.cs b/Runtime/Scripts/SceneExporter/ExporterAccessors.cs index 111fc0dfc..a9ca52c0e 100644 --- a/Runtime/Scripts/SceneExporter/ExporterAccessors.cs +++ b/Runtime/Scripts/SceneExporter/ExporterAccessors.cs @@ -842,7 +842,7 @@ private AccessorId ExportSparseAccessor(AccessorId baseAccessor, Vector3[] baseD for (int i = 0; i < arr.Length; i++) { var comparer = (baseAccessor == null || baseData == null) ? Vector3.zero : baseData[i]; - if (comparer != arr[i]) + if (!comparer.Equals(arr[i])) { indices.Add(i); }