diff --git a/.gitignore b/.gitignore index 72b73798b..bfc13b0a5 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ spine-unity/Library spine-unity/*.sln *.userprefs *.pidb +*.cachefile Assembly-*.csproj Assembly-*.pidb diff --git a/spine-unity/Assets/Spine/SkeletonComponent.cs b/spine-unity/Assets/Spine/SkeletonComponent.cs index c0f31f868..3a2eaa746 100644 --- a/spine-unity/Assets/Spine/SkeletonComponent.cs +++ b/spine-unity/Assets/Spine/SkeletonComponent.cs @@ -196,9 +196,11 @@ public class SkeletonComponent : MonoBehaviour { if (calculateTangents) { Vector4[] tangents = this.tangents; int count = mesh.normals.Length; - if (tangents.Length != count) this.tangents = tangents = new Vector4[count]; - for (int i = 0; i < count; i++) - tangents[i] = new Vector4(1, 0, 0, 1); + if (tangents.Length != count) { + this.tangents = tangents = new Vector4[count]; + for (int i = 0; i < count; i++) + tangents[i] = new Vector4(1, 0, 0, 1); + } mesh.tangents = tangents; } }