I am spawning an object randomly in one of 5 locations using a vector array. How can I spawn another object using the same array anywhere BUT where the previous object was spawned?
The first object is spawned using code similar to this:
var num : int = Random.Range(0,vectorArray.Length);
Instantiate (gameObject, vectorArray[num], transform.rotation);
Now, how can I yield for a certain amount of seconds and then instantiate a second object at random, excluding the previous spawn point (because that object will still be present and don’t want objects overlapping).