void Start(){ StartCoroutine(SpawnObject()); } IEnumerator SpawnObject(){ while (true){ yield return new WaitForSeconds(1.0f); // every 1 second Instantiate(objectToSpawn); } }
void Start(){ StartCoroutine(SpawnObject()); } IEnumerator SpawnObject(){ while (true){ yield return new WaitForSeconds(1.0f); // every 1 second Instantiate(objectToSpawn); } }