Article From:https://www.cnblogs.com/vsirWaiter/p/9122524.html
this.GetComponent<Button>().enabled = false;//Disable buttonIf you need to turn the button gray, you need additional treatment.I recently discovered a button that disables and turns gray. In recent years, the code has been written in white.This.GetComponent< Button> ().InteractablE = false; / / / / disable and grey

  

Link of this Article: Unity button disable and gray

Leave a Reply

Your email address will not be published. Required fields are marked *