Hi.
I have created an array of Button using this code:
public Button allObjs;
I want to disable all of the buttons in the start using code. I’ve tried this:
case 1:
InstructionsText.text = "PRESS THE RED BUTTON";
foreach(Button obj in allObjs){
obj.GetComponent<Button> ().interactable = false;
}
However this only makes the buttons grey and not clickable. I want to completely disable them.
I tried using the Button.GetComponent().SetActive(false); method but it gives me an error stating that no gameobject found in the button.
Please tell me how do I disable these buttons, Thank you.