From 0a24fc576f5d540ca4235e9ab0bf70ac5d7c7031 Mon Sep 17 00:00:00 2001 From: Dgizusse Date: Mon, 13 May 2013 19:04:31 -0400 Subject: [PATCH] - Recalculate normals only if required by the SpriteCollection. --- spine-tk2d/Code/tk2dSpineSkeleton.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spine-tk2d/Code/tk2dSpineSkeleton.cs b/spine-tk2d/Code/tk2dSpineSkeleton.cs index ba41a3c90..b0fb8f4e5 100644 --- a/spine-tk2d/Code/tk2dSpineSkeleton.cs +++ b/spine-tk2d/Code/tk2dSpineSkeleton.cs @@ -137,7 +137,10 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor mesh.colors = colors; mesh.uv = uvs; mesh.triangles = triangles; - mesh.RecalculateNormals(); + + if (skeletonDataAsset.sprites.normalGenerationMode != tk2dSpriteCollection.NormalGenerationMode.None) { + mesh.RecalculateNormals(); + } renderer.sharedMaterial = skeletonDataAsset.sprites.spriteCollection.inst.materials[0]; }