在论坛上也搜到这个问题,但并没有看到解决方案啊。不知道哪里错了。
Xcode9 下 CC1.6项目
OC代码:
ScriptingCore::getInstance()->evalString(“cc.find(‘Canvas’).getComponent(‘Loading’).reloadGame();”);
报错信息:
Evaluating cc.find(‘Canvas’).getComponent(‘Loading’).reloadGame(); failed (evaluatedOK == JS_FALSE)
JS Exception: cc.find(…).getComponent(…) is null, file: , lineno: 1
JS:
reloadGame:function(){
// cc.director.resume();
console.log("reloadgame resume ");
},
求大佬指点如何处理。。。