From 41f9aeac18c96cbe0516f59bb5873e786a16b851 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 24 Feb 2020 15:40:24 +0100 Subject: [PATCH] [unity] Fixed a bug in SkeletonGraphic when submesh instructions are empty and clipping is active. --- .../Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs index fb7ff11a6..28ec5b141 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs @@ -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);