GetState()

var butStatus = myButton.GetState()
if (butStatus == true)
{
 myButton.SetState(false)
}

In the example above, the current state of the Button object named myButton is stored in the variable butStatus. The SetState function is used in an if statement to change the object state to Up if it is currently set to Down.

Close