下面是搜的https://forum.cocos.org/t/prefab/37759,
按照搜的: var url = “res/label95”;
cc.loader.load(url, (err, prefab) => {
var node = cc.instantiate(prefab);
this.node.addChild(node);
//node.position = cc.v2(0, 0);
});
提示:
Simulator: JS: [ERROR]: The thing you want to instantiate must be an object
Simulator: JS: [ERROR]: addChild: The child to add must be instance of cc.Node, not .
