mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fix clipper skipping non-rendered slot.
This commit is contained in:
parent
33cd0a6a75
commit
baa6ed3e60
@ -501,6 +501,7 @@ namespace Spine.Unity {
|
|||||||
|
|
||||||
Color c = default(Color);
|
Color c = default(Color);
|
||||||
|
|
||||||
|
// Identify and prepare values.
|
||||||
var region = attachment as RegionAttachment;
|
var region = attachment as RegionAttachment;
|
||||||
if (region != null) {
|
if (region != null) {
|
||||||
region.ComputeWorldVertices(slot.bone, workingVerts, 0);
|
region.ComputeWorldVertices(slot.bone, workingVerts, 0);
|
||||||
@ -531,6 +532,9 @@ namespace Spine.Unity {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If not any renderable attachment.
|
||||||
|
clipper.ClipEnd(slot);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -557,6 +561,7 @@ namespace Spine.Unity {
|
|||||||
uvs = clipper.clippedUVs.Items;
|
uvs = clipper.clippedUVs.Items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Actually add slot/attachment data into buffers.
|
||||||
if (attachmentVertexCount != 0 && attachmentIndexCount != 0) {
|
if (attachmentVertexCount != 0 && attachmentIndexCount != 0) {
|
||||||
if (tintBlack)
|
if (tintBlack)
|
||||||
AddAttachmentTintBlack(slot.r2, slot.g2, slot.b2, attachmentVertexCount);
|
AddAttachmentTintBlack(slot.r2, slot.g2, slot.b2, attachmentVertexCount);
|
||||||
@ -633,6 +638,7 @@ namespace Spine.Unity {
|
|||||||
submeshItems[oldTriangleCount + i] = attachmentTriangleIndices[i] + ovc;
|
submeshItems[oldTriangleCount + i] = attachmentTriangleIndices[i] + ovc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clipper.ClipEnd(slot);
|
clipper.ClipEnd(slot);
|
||||||
}
|
}
|
||||||
clipper.ClipEnd();
|
clipper.ClipEnd();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user