UnityGLTF
UnityGLTF copied to clipboard
Fix min/max mismatch errors from ExportSparseAccessor
When exporting sparse accessors through the ExportAccessors class, UnityGLTF currently uses the == operator to compare between baseData and data. However, this operator determines approximate equality rather than exact equality, causing some data values to be considered identical to the base value (usually a zero vector) and thus omitted.
Although this difference might seem negligible, it can result in discrepancies between the values referenced for min/max calculations and those stored in the buffer, potentially causing errors like ACCESSOR_MIN_MISMATCH. To address this issue, I have replaced the == operator with the Equals method to perform precise comparisons.