From 92728548b7402bea41f0bfe2a3fdcc2a2f7c5f97 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 13 Apr 2023 17:58:19 +0200 Subject: [PATCH] [unity] Minor: refactoring, variable renamed. --- .../spine-unity/Mesh Generation/MeshGenerator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs index a58ebea2b..c9275c252 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Mesh Generation/MeshGenerator.cs @@ -813,8 +813,8 @@ namespace Spine.Unity { b2.x *= alpha; b2.y = slot.Data.BlendMode == BlendMode.Additive ? 0 : alpha; } - int meshVertexCount = meshAttachment.WorldVerticesLength; - for (int iii = 0; iii < meshVertexCount; iii += 2) { + int verticesArrayLength = meshAttachment.WorldVerticesLength; + for (int iii = 0; iii < verticesArrayLength; iii += 2) { uv2i[vi] = rg; uv3i[vi] = b2; vi++; @@ -886,8 +886,8 @@ namespace Spine.Unity { } else { //if (settings.renderMeshes) { MeshAttachment meshAttachment = attachment as MeshAttachment; if (meshAttachment != null) { - int meshVertexCount = meshAttachment.WorldVerticesLength; - if (tempVerts.Length < meshVertexCount) this.tempVerts = tempVerts = new float[meshVertexCount]; + int verticesArrayLength = meshAttachment.WorldVerticesLength; + if (tempVerts.Length < verticesArrayLength) this.tempVerts = tempVerts = new float[verticesArrayLength]; meshAttachment.ComputeWorldVertices(slot, tempVerts); if (settings.pmaVertexColors) { @@ -917,7 +917,7 @@ namespace Spine.Unity { if (fy > bmax.y) bmax.y = fy; } - for (int iii = 0; iii < meshVertexCount; iii += 2) { + for (int iii = 0; iii < verticesArrayLength; iii += 2) { float x = tempVerts[iii], y = tempVerts[iii + 1]; vbi[vertexIndex].x = x; vbi[vertexIndex].y = y; vbi[vertexIndex].z = z; cbi[vertexIndex] = color; ubi[vertexIndex].x = attachmentUVs[iii]; ubi[vertexIndex].y = attachmentUVs[iii + 1];