[unity] Fix MeshGenerator unnecessarily replacing buffer objects.

This commit is contained in:
pharan 2018-10-17 22:06:24 +08:00
parent 8e7b8cc58b
commit 0b36f0becc

View File

@ -457,10 +457,12 @@ namespace Spine.Unity {
if (submeshes.Count - 1 < submeshIndex) {
submeshes.Resize(submeshIndex + 1);
if (submeshes.Items[submeshIndex] == null)
submeshes.Items[submeshIndex] = new ExposedList<int>();
}
var submesh = submeshes.Items[submeshIndex];
if (submesh == null)
submeshes.Items[submeshIndex] = submesh = new ExposedList<int>();
submesh.Clear(false);
var skeleton = instruction.skeleton;