按钮设置禁用disabled是不是没用?

api中说设置interactable 我尝试了下 不行,enabled也试了下没用

我一般都是用的active:

this.node.getChildByName('gk1_btn').active = false;

你要获得button组件,才能禁用。
在节点上是操作是没用的

楼上正解

使用 this.node.getChildByName(‘gk1_btn’).getComponent(cc.Button).interactable = false;

谢谢,原来如此。