public void DrawMapInEditor()
{
textureData.ApplyToMaterial(terrainMaterial);
textureData.UpdateMeshHeights(terrainMaterial, heightMapSettings.minHeight, heightMapSettings.maxHeight);
ChunkBorderInfo chunkBorderInfo = new ChunkBorderInfo(false, FalloffGenerator.Corner.TOPLEFT, false, FalloffGenerator.Edge.TOP);
HeightMap heightMap = HeightMapGenerator.GenerateHeightMap(meshSettings.numberVerticesPerLine, meshSettings.numberVerticesPerLine, heightMapSettings, mapRulesSettings, Vector2.zero, chunkBorderInfo);
CleanScene();
if (drawMode == DrawMode.NoiseMap)
{
DrawTexture(TextureGenerator.TextureFromHeightMap(heightMap));
}
else if (drawMode == DrawMode.FalloffMap)
{
DrawTexture(TextureGenerator.TextureFromHeightMap(new HeightMap(FalloffGenerator.GenerateFalloffMap(meshSettings.numberVerticesPerLine, mapRulesSettings), 0, 1)));
}
else if (drawMode == DrawMode.Mesh)
{
DrawMesh(MeshGenerator.GenerateTerrainMesh(heightMap.values, meshSettings, editorPreviewLOD));
}
else if (drawMode == DrawMode.Map)
{
DrawMesh(MeshGenerator.GenerateTerrainMesh(heightMap.values, meshSettings, editorPreviewLOD));
DrawMap();
}
}