mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Fix MeshGenerator unnecessarily disposing buffer objects.
This commit is contained in:
parent
8d74ef06ac
commit
27828048fb
@ -455,9 +455,10 @@ namespace Spine.Unity {
|
|||||||
public void AddSubmesh (SubmeshInstruction instruction, bool updateTriangles = true) {
|
public void AddSubmesh (SubmeshInstruction instruction, bool updateTriangles = true) {
|
||||||
var settings = this.settings;
|
var settings = this.settings;
|
||||||
|
|
||||||
if (submeshes.Count - 1 < submeshIndex) {
|
int newSubmeshCount = submeshIndex + 1;
|
||||||
submeshes.Resize(submeshIndex + 1);
|
if (submeshes.Items.Length < newSubmeshCount)
|
||||||
}
|
submeshes.Resize(newSubmeshCount);
|
||||||
|
submeshes.Count = newSubmeshCount;
|
||||||
var submesh = submeshes.Items[submeshIndex];
|
var submesh = submeshes.Items[submeshIndex];
|
||||||
if (submesh == null)
|
if (submesh == null)
|
||||||
submeshes.Items[submeshIndex] = submesh = new ExposedList<int>();
|
submeshes.Items[submeshIndex] = submesh = new ExposedList<int>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user