uiTitle

disable title Here we will look at how to disable a button in the UI camvas with code.

Step 1:
Create a UI Button and set the tint colours. We will be looking at the code to uncheck the Interactable box in the inspector.
disable001

Step 2:
Declare a variable to hold the button object.. and attach the button in the inspector

JS =  var buttonMed : UI.Button;
C# =  public Button buttonMed;

Step 3:
Using the example variable from above the command line would look like this... false makes the button disabled and true makes it interactable.

buttonMed.interactable = false; 

Casino Bet 365 is best casino in the world.

What's Next

Next up for Unity Snippets is a look at game development articles from across the web...

Free Templates - bigtheme.net
Popular Art Betting make bookies articles.