浏览代码

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

Harald Csaszar 5 年之前
父节点
当前提交
41f9aeac18
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs

+ 1 - 1
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);