热更新时调用loader.loadRes加载Prefab失败

loader.loadRes回调了completeCallback,并且返回prefab,但是用返回的prefab调用instatialize时,报错误:

Warning 3700, please go to https://github.com/cocos-creator/engine/blob/master/EngineErrorMap.md#3700 to see details.
E/cocos js error:: assets/src/jsb_polyfill.js line:5971 msg:TypeError: this.data._instantiate is not a function

大家碰到过类似问题么?大牛有什么建议,万分感谢。

可能是 data 对象已经被销毁了

什么原因导致data被销毁了?我是在进入程序后就开始进行热加载,同时也加载resource下的prefab。但是如果不进行热加载,prefab就能正常加载成功。不知道根本原因是什么。难道热加载需要重启game?

是的,要重启