Make spawn object disappear and show for a while
public void MakeDisappearAndDie(GameObject spawnObject) { spawnObject.SetActive(false); //Destroy(spawnObject); StartCoroutine(WaitAndDestroy(spawnObject)); } IEnumerator WaitAndDestroy(GameObject spawnObject) { yield return new WaitForSeconds(2); Destroy(spawnObject); }