// Update is called once per frame void Update() { if (!GLOBAL.IS_PAUSED) { elapsedTime += Time.deltaTime; } if (levelHandler.GetDestroyedTargets() >= spawnAmount && !hasSpawned) { child.gameObject.SetActive(true); hasSpawned = true; // Does not support the pause function StartCoroutine(Kill(time)); } }