//Will Change the status of a game object public void PauseTime() { DayNightController dn = sun.GetComponent <DayNightController>(); dn.SetActive(!dn.isActive()); }