Unity button disable and gray

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