[unity] Fixed Immutable Triangles having no effect by default. Closes #2636.

This commit is contained in:
Harald Csaszar 2025-10-09 12:18:47 +02:00
parent 38a8f8961e
commit 56734cde15

View File

@ -147,14 +147,14 @@ namespace Spine.Unity {
if (calledFromMainThread && !Application.isPlaying)
return true;
#endif
if (a.hasActiveClipping || b.hasActiveClipping) return true; // Triangles are unpredictable when clipping is active.
if (a.immutableTriangles != b.immutableTriangles) return true;
if (a.immutableTriangles) return false;
// Everything below assumes the raw vertex and triangle counts were used. (ie, no clipping was done)
if (a.rawVertexCount != b.rawVertexCount) return true;
if (a.immutableTriangles != b.immutableTriangles) return true;
int attachmentCountB = b.attachments.Count;
if (a.attachments.Count != attachmentCountB) return true; // Bounds check for the looped storedAttachments count below.