mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 00:58:43 +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
|
||||
*.userprefs
|
||||
*.pidb
|
||||
*.cachefile
|
||||
Assembly-*.csproj
|
||||
Assembly-*.pidb
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user