- Recalculate normals only if required by the SpriteCollection.

This commit is contained in:
Dgizusse 2013-05-13 19:04:31 -04:00
parent a1570c960a
commit 0a24fc576f

View File

@ -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];
}