mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
No need to recompute tangents.
This commit is contained in:
parent
d26317ab99
commit
7d7158894d
1
.gitignore
vendored
1
.gitignore
vendored
@ -46,6 +46,7 @@ spine-unity/Library
|
|||||||
spine-unity/*.sln
|
spine-unity/*.sln
|
||||||
*.userprefs
|
*.userprefs
|
||||||
*.pidb
|
*.pidb
|
||||||
|
*.cachefile
|
||||||
Assembly-*.csproj
|
Assembly-*.csproj
|
||||||
Assembly-*.pidb
|
Assembly-*.pidb
|
||||||
|
|
||||||
|
|||||||
@ -196,9 +196,11 @@ public class SkeletonComponent : MonoBehaviour {
|
|||||||
if (calculateTangents) {
|
if (calculateTangents) {
|
||||||
Vector4[] tangents = this.tangents;
|
Vector4[] tangents = this.tangents;
|
||||||
int count = mesh.normals.Length;
|
int count = mesh.normals.Length;
|
||||||
if (tangents.Length != count) this.tangents = tangents = new Vector4[count];
|
if (tangents.Length != count) {
|
||||||
for (int i = 0; i < count; i++)
|
this.tangents = tangents = new Vector4[count];
|
||||||
tangents[i] = new Vector4(1, 0, 0, 1);
|
for (int i = 0; i < count; i++)
|
||||||
|
tangents[i] = new Vector4(1, 0, 0, 1);
|
||||||
|
}
|
||||||
mesh.tangents = tangents;
|
mesh.tangents = tangents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user