From 56734cde1584a058379fa1a151bd0b57e328c636 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 9 Oct 2025 12:18:47 +0200 Subject: [PATCH] [unity] Fixed `Immutable Triangles` having no effect by default. Closes #2636. --- .../Mesh Generation/SkeletonRendererInstruction.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SkeletonRendererInstruction.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SkeletonRendererInstruction.cs index c08c87de0..2c23d0a6e 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SkeletonRendererInstruction.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SkeletonRendererInstruction.cs @@ -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.