From 3a96c22c3a25accb4068b48b04dd2ecc961a402e Mon Sep 17 00:00:00 2001 From: pharan Date: Thu, 15 Nov 2018 11:30:48 +0800 Subject: [PATCH] [unity] Fix mesh generator submesh buffer starting too large. --- .../Spine/Runtime/spine-unity/Mesh Generation/SpineMesh.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SpineMesh.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SpineMesh.cs index 487fe5396..260362b42 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SpineMesh.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/SpineMesh.cs @@ -175,6 +175,10 @@ namespace Spine.Unity { } } + public MeshGenerator () { + submeshes.TrimExcess(); + } + #region Step 1 : Generate Instructions public static void GenerateSingleSubmeshInstruction (SkeletonRendererInstruction instructionOutput, Skeleton skeleton, Material material) { ExposedList drawOrder = skeleton.drawOrder;