Hey guys. Basically all i need to do is randomly spawn sprites that fall across the screen on the screen space overlay canvas. Instantiate needs a vector 3 as a position, but the canvas does not have a vector3 position just a rect transform. So either need to instantiate using rect transform (which doesnt seem like it woul dbe possible) or get the equivelent postion in the UI using a vector. Hope that makes sense.
Something like this
GameObject randomGerm = germs[Random.Range(0, germs.Length)];
Vector3 spawnPosition = new Vector3(Random.Range(-spawnValues.x, spawnValues.x) ,spawnValues.y,spawnValues.z);
Quaternion spawnRotation = Quaternion.identity; //new Quaternion ();
GameObject germSpawned = Instantiate (randomGerm, spawnPosition, spawnRotation) as GameObject;
But this will only spawn in world space not the UI/Canvas… hope you know what im aiming at
thanks guys