using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameController : MonoBehaviour { public GameObject hazard; public Vector3 spawnValues; public float spawnTime=100f; public int spawnlimit=25; public int meteorites; void Start () { } // Update is called once per frame void Update () { StartCoroutine (waitSpawner ()); } IEnumerator waitSpawner(){ yield return new WaitForSeconds (spawnTime); if (meteorites != spawnlimit) { Vector3 SpawnPosition=new Vector3(Random.Range(-sp } } }