Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Toggle value change

public void valueChanged(Toggle t)
    {
        if (t.isOn) {
            t.GetComponentInChildren<Text> ().text = "Toggle is on";
        } else {
            t.GetComponentInChildren<Text> ().text = "Toggle is off";
        }
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Toggle #change
ADD COMMENT
Topic
Name
2+9 =