فهرست منبع

[unity] Match pre-initialized buffer size of submesh indices.

pharan 8 سال پیش
والد
کامیت
5fcb77eb1a
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs

+ 3 - 3
spine-unity/Assets/spine-unity/Mesh Generation/SpineMesh.cs

@@ -110,9 +110,9 @@ namespace Spine.Unity {
 		const float BoundsMinDefault = float.MaxValue;
 		const float BoundsMaxDefault = float.MinValue;
 
-		[NonSerialized] readonly ExposedList<Vector3> vertexBuffer = new ExposedList<Vector3>();
-		[NonSerialized] readonly ExposedList<Vector2> uvBuffer = new ExposedList<Vector2>();
-		[NonSerialized] readonly ExposedList<Color32> colorBuffer = new ExposedList<Color32>();
+		[NonSerialized] readonly ExposedList<Vector3> vertexBuffer = new ExposedList<Vector3>(4);
+		[NonSerialized] readonly ExposedList<Vector2> uvBuffer = new ExposedList<Vector2>(4);
+		[NonSerialized] readonly ExposedList<Color32> colorBuffer = new ExposedList<Color32>(4);
 		[NonSerialized] readonly ExposedList<ExposedList<int>> submeshes = new ExposedList<ExposedList<int>> { new ExposedList<int>(6) }; // start with 1 submesh.
 
 		[NonSerialized] Vector2 meshBoundsMin, meshBoundsMax;