Hello I am new to unity, and would like to know, how can I make it so a object spawns after 10 seconds you have entered the game?
Thanks!
Hello I am new to unity, and would like to know, how can I make it so a object spawns after 10 seconds you have entered the game?
Thanks!
That is the simplest I can think of:
public class SpawnObject: MonoBehaviour {
public GameObject spawnObjectPrefab; //assing the Object you want to Spawn in inspector
void Start() {
Invoke("Spawn", 10); //Call Method "Spawn" in 10 seconds
}
void Spawn() {
//Spawn an object at Vector3(0,0,0) with standart rotation
Instantiate(spawnObjectPrefab, Vector3.zero, Quaternion.identity);
}
}