소스 검색

[unity] Fixed clipping masks not always working on additional atlas pages, when clipping end slot is first submesh attachment. Closes #1618.

Harald Csaszar 5 년 전
부모
커밋
68595c439d
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs

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

@@ -302,11 +302,6 @@ namespace Spine.Unity {
 					}
 				}
 
-				if (clippingEndSlot != null && slot.data == clippingEndSlot && i != clippingAttachmentSource) {
-					clippingEndSlot = null;
-					clippingAttachmentSource = -1;
-				}
-
 				// Create a new SubmeshInstruction when material changes. (or when forced to separate by a submeshSeparator)
 				// Slot with a separator/new material will become the starting slot of the next new instruction.
 				if (hasSeparators) { //current.forceSeparate = hasSeparators && separatorSlots.Contains(slot);
@@ -381,6 +376,11 @@ namespace Spine.Unity {
 					totalRawVertexCount += attachmentVertexCount;
 					#endif
 				}
+
+				if (clippingEndSlot != null && slot.data == clippingEndSlot && i != clippingAttachmentSource) {
+					clippingEndSlot = null;
+					clippingAttachmentSource = -1;
+				}
 			}
 
 			if (current.rawVertexCount > 0) {