I’ve done a little research on this and can’t find the answer I’m after. How do I have an enemy spawn 30 seconds after the game starts?
They only need to be spawned the one time via this method.
I’ve done a little research on this and can’t find the answer I’m after. How do I have an enemy spawn 30 seconds after the game starts?
They only need to be spawned the one time via this method.
Javascript:
function Start() {
yield WaitForSeconds(30);
// Do your spawning here
}
C#:
IEnumerator Start() {
yield return new WaitForSeconds(30.0f);
// Do your spawning here
}
See also Invoke() or you can make the Spawn() function a coroutine instead of Start().
Use Invoke().