private void Start() { mc = GetComponent <MarchingCubes>(); meshFilter = GetComponent <MeshFilter>(); mc.ClearMeshData(); tmap = GenerateTerrain(); CreateMeshData(); meshFilter.mesh = marchingcubes.Utils.BuildMesh(mc.Vertices, mc.Tris); }