mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Fix MeshGenerator unnecessarily disposing buffer objects.
This commit is contained in:
parent
89e85884df
commit
0fa7633ad1
@ -455,10 +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.Items.Length - 1 < submeshIndex) {
|
int newCount = submeshIndex + 1;
|
||||||
submeshes.Resize(submeshIndex + 1);
|
if (submeshes.Items.Length < newCount)
|
||||||
}
|
submeshes.Resize(newCount);
|
||||||
|
submeshes.Count = newCount;
|
||||||
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