结构如下,nextBtn绑定的脚本中获取main下面的节点mainBall,如果用
this.node.getParent().getChildByName(‘main’).getChildByName(‘mainBall’)获取到node,但是执行mainBall中的方法会报错not function。
通过this.node.getParent().getChildByName(‘main’).getComponentInChildren(‘mainBall’)获取则获取不到。
求教,如何获取?getComponentInChildren和getChildByName不应该是一样的吗?

报错截图:
