diff --git a/unity/org.gamecult.geometry/Runtime/Unity/PlanetaryPatchMeshAdapter.cs b/unity/org.gamecult.geometry/Runtime/Unity/PlanetaryPatchMeshAdapter.cs index 111b9931..e880842d 100644 --- a/unity/org.gamecult.geometry/Runtime/Unity/PlanetaryPatchMeshAdapter.cs +++ b/unity/org.gamecult.geometry/Runtime/Unity/PlanetaryPatchMeshAdapter.cs @@ -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; } }