Skip to content

Commit

Permalink
[unity] Minor: refactoring, variable renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaraldCsaszar committed Apr 13, 2023
1 parent 7d0833f commit 9272854
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -813,8 +813,8 @@ public struct Settings {
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++;
Expand Down Expand Up @@ -886,8 +886,8 @@ public struct Settings {
} 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) {
Expand Down Expand Up @@ -917,7 +917,7 @@ public struct Settings {
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];
Expand Down

0 comments on commit 9272854

Please sign in to comment.