Unity按钮禁用和变灰

this.GetComponent<Button>().enabled = false;//禁用按钮
如果需要将按钮变灰,则需要另外处理

this.GetComponent<Button>().interactable = false;//禁用和变灰

  

原文地址:https://www.cnblogs.com/vsirWaiter/p/9122524.html