Changement de valeur de basculement

public void valueChanged(Toggle t)
    {
        if (t.isOn) {
            t.GetComponentInChildren<Text> ().text = "Toggle is on";
        } else {
            t.GetComponentInChildren<Text> ().text = "Toggle is off";
        }
    }
Shivam Abhiwan