GameObject.Find ("/Canvas/Toggle").GetComponent<Toggle> ().isOn = true; GameObject.Find ("/Canvas/Toggle").GetComponent<Toggle> ().isOn = false;