public GameObject obj1;
public GameObject obj2;
public GameObject obj3;
public void Start(){
StartCoroutine(Spawner());
}
IEnumerator spawner(){
while(true){
yield return new WaitForSecond(2f);
int obj = Random.Range(1,3);
switch(obj){
case 1:
Instantiate(obj1, new Vector3(i * 2.0F, 0, 0), Quaternion.identity);//свои координаты лепите
break;
case 2:
Instantiate(obj2, new Vector3(i * 2.0F, 0, 0), Quaternion.identity);//свои координаты лепите
break;
case 3:
Instantiate(obj3, new Vector3(i * 2.0F, 0, 0), Quaternion.identity);//свои координаты лепите
break;
}
}