I have a button which is initially set to be invisible and I want to unhide it with a script
I tried restart_btn.enabled = true; but it does not work.
any thought> thanks!
I have a button which is initially set to be invisible and I want to unhide it with a script
I tried restart_btn.enabled = true; but it does not work.
any thought> thanks!
Ok, use SetActive(false) or SetActive(true);
In your case, if you have a variable that stores the button(restart_btn) then you could do :
public void hide(){
restart_btn.SetActive(false);
}
public void show(){
restart_btn.SetActive(true);
}
This worked for me