Random rotation (7519)

Hi,

I am using the following code to spawn some cubes.

function SpawnObject(SpawnAmount)
{
    for (var i = 1; i <= objectAmount; i++)
    {
        var position = Vector3(Random.Range(-12, 9.6), 1.5, Random.Range(-8, 8));
        var createObject = Instantiate(createObject, position, Quaternion.identity);                
    }   

}

But the cube need to have a random rotation so that they will go different ways. I have tried Random.Rotation but this makes the cubes rotate on x,y,z, i only want a random rotation on y.

Rotate the objects in the Update() or FixedUpdate() call by modifying the transform.rotation of the objects.