ProceduralGenerator GenerateMapFromRandom()
    {
        ProceduralGenerator mapGen = GetComponent <ProceduralGenerator>();

        width  = mapGen.GetWidth();
        height = mapGen.GetHeight();
        Color32[] colorMap = mapGen.GenerateMap();
        GenerateMapPreview(colorMap);

        MapData.Width         = width;
        MapData.Height        = height;
        MapData.ColorMap      = colorMap;
        MapData.BaseLocationX = mapGen.GetBaseLocationX();
        MapData.BaseLocationY = mapGen.GetBaseLocationY();

        return(mapGen);
    }
 public void GeneratePreview()
 {
     ProceduralGenerator gen       = GenerateMapFromRandom();
     Vector2             baseStart = new Vector2(-width / 2 + gen.GetBaseLocationX() - 0.5f, -height / 2 + gen.GetBaseLocationY() - 0.5f);
 }