Disambiguate Unity mesh adapter type
This commit is contained in:
parent
4fcb181d8d
commit
d91b59eb4a
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ namespace GameCult.Geometry.Unity
|
|||
|
||||
public static class PlanetaryPatchMeshAdapter
|
||||
{
|
||||
public static Mesh CreateFaceMesh(PlanetaryCubeFace face, int cellsPerAxis, float radius = 1)
|
||||
public static UnityEngine.Mesh CreateFaceMesh(PlanetaryCubeFace face, int cellsPerAxis, float radius = 1)
|
||||
{
|
||||
if (!float.IsFinite(radius) || radius <= 0) throw new ArgumentOutOfRangeException(nameof(radius));
|
||||
var source = PlanetaryPatch.CreateFace(face, cellsPerAxis);
|
||||
|
|
@ -22,7 +22,7 @@ public static class PlanetaryPatchMeshAdapter
|
|||
vertices[i] = normal * radius; normals[i] = normal;
|
||||
uv[i] = new Vector2(source.Vertices[i].LocalCoordinate.x, source.Vertices[i].LocalCoordinate.y);
|
||||
}
|
||||
var mesh = new Mesh { name = $"GameCult.Geometry Planetary {face} {cellsPerAxis}x{cellsPerAxis}", indexFormat = vertices.Length > ushort.MaxValue ? IndexFormat.UInt32 : IndexFormat.UInt16, vertices = vertices, normals = normals, uv = uv, triangles = source.Indices };
|
||||
var mesh = new UnityEngine.Mesh { name = $"GameCult.Geometry Planetary {face} {cellsPerAxis}x{cellsPerAxis}", indexFormat = vertices.Length > ushort.MaxValue ? IndexFormat.UInt32 : IndexFormat.UInt16, vertices = vertices, normals = normals, uv = uv, triangles = source.Indices };
|
||||
mesh.RecalculateBounds(); return mesh;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue