How would 1 instantiate a cube on a random position on screen , ortographic camera(2d game)?

Well i think the title of the question speaks for itself, i am trying to instantiate a cube on a random position on my screen.
If it’s possible could someone help me in C# ?

I haven’t tested this, but it should work.

public GameObject thePrefab;

void Update () {

   GameObject clone = (GameObject)Instantiate(thePrefab);
   clone.transform.position = Camera.ScreenToWorldPoint (Random.Range (0, camera.pixelWidth), Random.Range (0, camera.pixelHeight));
}