mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Don't need mesh.Clear() every frame.
This commit is contained in:
parent
59513b4afa
commit
43d572c187
@ -102,8 +102,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.Clear();
|
|
||||||
|
|
||||||
mesh.vertices = vertices;
|
mesh.vertices = vertices;
|
||||||
mesh.colors32 = colors;
|
mesh.colors32 = colors;
|
||||||
mesh.uv = uvs;
|
mesh.uv = uvs;
|
||||||
@ -144,6 +142,7 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
|
|||||||
#endif
|
#endif
|
||||||
if (quadCount == cachedQuadCount) return;
|
if (quadCount == cachedQuadCount) return;
|
||||||
|
|
||||||
|
mesh.Clear();
|
||||||
cachedQuadCount = quadCount;
|
cachedQuadCount = quadCount;
|
||||||
vertices = new Vector3[quadCount * 4];
|
vertices = new Vector3[quadCount * 4];
|
||||||
uvs = new Vector2[quadCount * 4];
|
uvs = new Vector2[quadCount * 4];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user