如何能够调用Prefab创建出来的对象的方法?

假设有Prefab A,
A.js 为:
cc.Class({
extends: cc.Component,

properties: {
},
doSomething: function() {
},

});

在其他js中,如何调用到A.doSomething?
instantiate方法出来的对象貌似不行

nodeA.getComponent(‘A’).doSomething()

2赞

谢谢:slightly_smiling: