Here we will look at how to disable a button in the UI camvas with code.
Create a UI Button and set the tint colours. We will be looking at the code to uncheck the Interactable box in the inspector.
Declare a variable to hold the button object.. and attach the button in the inspector
JS = var buttonMed : UI.Button;
C# = public Button buttonMed;
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;