Skip to content

Commit

Permalink
Don't need mesh.Clear() every frame.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed Aug 1, 2013
1 parent 59513b4 commit 43d572c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spine-tk2d/Code/tk2dSpineSkeleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
}
}

mesh.Clear();

mesh.vertices = vertices;
mesh.colors32 = colors;
mesh.uv = uvs;
Expand Down Expand Up @@ -143,7 +141,8 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
if (mesh.subMeshCount == submeshIndices.Count)
#endif
if (quadCount == cachedQuadCount) return;


mesh.Clear();
cachedQuadCount = quadCount;
vertices = new Vector3[quadCount * 4];
uvs = new Vector2[quadCount * 4];
Expand Down

0 comments on commit 43d572c

Please sign in to comment.