Browse Source

[unity] Fixed a clipping bug when there are two clipping meshes and clipping-end-slot is a skin bone that is disabled (Clipping.endClipping not called when slot.bone.active==false). See #1694.

Harald Csaszar 5 years ago
parent
commit
1707c8ce42

+ 4 - 1
spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs

@@ -503,7 +503,10 @@ namespace Spine.Unity {
 
 			for (int slotIndex = instruction.startSlot; slotIndex < instruction.endSlot; slotIndex++) {
 				var slot = drawOrderItems[slotIndex];
-				if (!slot.bone.active) continue;
+				if (!slot.bone.active) {
+					clipper.ClipEnd(slot);
+					continue;
+				}
 				var attachment = slot.attachment;
 				float z = zSpacing * slotIndex;