public static void Smooth(TerrainData terrain)
        {
            int heightmapWidth  = terrain.heightmapWidth;
            int heightmapHeight = terrain.heightmapHeight;

            float[,] heights = terrain.GetHeights(0, 0, heightmapWidth, heightmapHeight);
            HeightmapFilters.Smooth(heights, terrain);
            terrain.SetHeights(0, 0, heights);
        }
 void OnWizardCreate()
 {
     Undo.RegisterCompleteObjectUndo(terrainData, "Flatten Heightmap");
     HeightmapFilters.Flatten(terrainData, height / terrainData.size.y);
 }
 private void OnWizardCreate()
 {
     Undo.RegisterCompleteObjectUndo(base.terrainData, "Flatten Heightmap");
     HeightmapFilters.Flatten(base.terrainData, this.height / base.terrainData.size.y);
 }