Skip to content

Commit

Permalink
[unity] Fix some type uses in SpineMesh code.
Browse files Browse the repository at this point in the history
  • Loading branch information
pharan committed Jun 24, 2018
1 parent 38f66b8 commit 40a3a39
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -680,8 +680,8 @@ public struct Settings {

int vertexIndex = 0;
var tempVerts = this.tempVerts;
Vector3 bmin = this.meshBoundsMin;
Vector3 bmax = this.meshBoundsMax;
Vector2 bmin = this.meshBoundsMin;
Vector2 bmax = this.meshBoundsMax;

var vbi = vertexBuffer.Items;
var ubi = uvBuffer.Items;
Expand Down Expand Up @@ -988,10 +988,11 @@ public struct Settings {
mesh.bounds = new Bounds();
} else {
//mesh.bounds = ArraysMeshGenerator.ToBounds(meshBoundsMin, meshBoundsMax);
Vector2 halfSize = (meshBoundsMax - meshBoundsMin) * 0.5f;
float halfWidth = (meshBoundsMax.x - meshBoundsMin.x) * 0.5f;
float halfHeight = (meshBoundsMax.y - meshBoundsMin.y) * 0.5f;
mesh.bounds = new Bounds {
center = (Vector3)(meshBoundsMin + halfSize),
extents = new Vector3(halfSize.x, halfSize.y, meshBoundsThickness * 0.5f)
center = new Vector3(meshBoundsMin.x + halfWidth, meshBoundsMin.y + halfHeight),
extents = new Vector3(halfWidth, halfHeight, meshBoundsThickness * 0.5f)
};
}
}
Expand Down

0 comments on commit 40a3a39

Please sign in to comment.