Hi guys.Im working on app where I need to spawn object newBut wait 5 sec and spawn newBut2.
I tryed this code
GameObject newBut = Instantiate (Lann, transform.position + (transform.forward * 10), transform.rotation) as GameObject;
yield WaitForSeconds(5);
GameObject newBut2 = Instantiate (Lann, transform.position + (transform.forward * 5), transform.rotation) as GameObject;
And I tried this code
GameObject newBut = Instantiate (Lann, transform.position + (transform.forward * 10), transform.rotation) as GameObject;
WaitForSeconds wait = new WaitForSeconds (5);
GameObject newBut2 = Instantiate (Lann, transform.position + (transform.forward * 5), transform.rotation) as GameObject;
But none of these codes worked can you help me please?
Cheer pajamac