Unity simple map generation
As a first step, I think this is cleaner than the switch

if (change &lt;= 10)
{
    Instantiate(cube, here, Quaternion.identity);
}
else if (change &lt;= 16)
{
    Instantiate(cube1, here, Quaternion.identity);
}
else
{
    Instantiate(cube2, here, Quaternion.identity);
}


But there's still repetition with the calls to Instantiate. I'd suggest creating a new method like this

private GameObject GetRandomCube()
{
    var change = (int)Random.Range(0, 19);
    if (change &lt;= 10)
    {
        return cube;
    }

    if (change &lt;= 16)
    {
        return cube1;
    }

    return cube2;
}


And then use it like this in your loop

Instantiate(GetRandomCube(), here, Quaternion.identity);


If here isn't being used elsewhere in the class, move its declaration inside the inner loop, or just use it in the function call. Now your method looks like this

void Start()
{
    for (var y = 0; y &lt; 50; y++)
    {
        for (var x = 0; x &lt; 10; x++)
        {
            Instantiate(GetRandomCube(), new Vector3(x, y, 0), Quaternion.identity);
        }
    }
}