[unity] Fixed a bug in SkeletonGraphic when submesh instructions are empty and clipping is active.

This commit is contained in:
Harald Csaszar 2020-02-24 15:40:24 +01:00
parent 8558aa6258
commit 41f9aeac18

View File

@ -332,7 +332,7 @@ namespace Spine.Unity {
bool updateTriangles = SkeletonRendererInstruction.GeometryNotEqual(currentInstructions, smartMesh.instructionUsed);
meshGenerator.Begin();
if (currentInstructions.hasActiveClipping) {
if (currentInstructions.hasActiveClipping && currentInstructions.submeshInstructions.Count > 0) {
meshGenerator.AddSubmesh(currentInstructions.submeshInstructions.Items[0], updateTriangles);
} else {
meshGenerator.BuildMeshWithArrays(currentInstructions, updateTriangles);