热更新新增一个场景,加载这个场景失败

  • Creator 版本:2.0.9

  • 目标平台: Android

  • 详细报错信息,包含调用堆栈:src/cocos2d-jsb.js:6870 loadScene: Can not load the scene ‘test’ because it was not in the build settings before playing.
    27.cc.errorID @ src/cocos2d-jsb.js:6870
    loadScene @ src/cocos2d-jsb.js:7115
    (anonymous) @ src/project.dev.js:239
    33.proto.trigger @ src/cocos2d-jsb.js:9303
    33.proto.update @ src/cocos2d-jsb.js:9283
    update @ src/cocos2d-jsb.js:9400
    mainLoop @ src/cocos2d-jsb.js:7242
    callback @ src/cocos2d-jsb.js:7475
    tick @ jsb-adapter/jsb-builtin.js:2001

通过热更新的方式新增了一个场景,更新成功后加载这个场景报错:loadScene: Can not load the scene ‘test’ because it was not in the build settings before playing.
不能通过热更新新增场景吗?还是有什么需要设置?

最少你需要重启才能刷新settings.js

我也遇到了这个问题,关键我是第一次更新完,restart.game 可以进入场景。杀掉应用后,场景就进不去了。searchPath 是存localStorage里的,打印了更新后,和第二次启动后是一致的路径。

太奇怪了。

已解决。