this.GetComponent<Button>().enabled = false;//禁用按钮 如果需要将按钮变灰,则需要另外处理 最近才发现一个禁用和变灰的按钮,这几年的代码我踏马真是白写了 this.GetComponent<Button>().interactable = false;//禁用和变灰
this.GetComponent<Button>().enabled = false;//禁用按钮 如果需要将按钮变灰,则需要另外处理 最近才发现一个禁用和变灰的按钮,这几年的代码我踏马真是白写了 this.GetComponent<Button>().interactable = false;//禁用和变灰