基于 creator2.4.3 assets bundle 大厅子游戏热更的新姿势

为什么我加载bundle跳转不到游戏里边,bundle.loadScene()这里一直进不去。
loadBundle: function (bundleName) {
var sceneName = {};
sceneName[‘bundle1’] = ‘Bundle1Scene’;
sceneName[‘bundle2’] = ‘Bundle2Scene’;
cc.assetManager.loadBundle(bundleName, null, (err, bundle) => {
//这里存一下bundle,在bundle场景销毁的时候释放,保证下次bundle热更之后引用的资源都是最新的
window[bundleName] = bundle;
console.log(‘bundle=’, bundle);
bundle.loadScene(sceneName[bundleName], (err, sceneAsset) => {
if (err) {
console.log(‘err=’, err);
} else {
console.log(‘sceneAsset=’, sceneAsset);
}
cc.director.runScene(sceneAsset);
});
});
},

我用2.3.3实现了 大厅和子游戏 热更新的功能,大厅一个工程,子游戏一个工程 相互不影响,2.4.x 资源目录都变化了 ,需要重新实现了,懒的弄了 ,就还是用2.3.3版本

必须顶起来。

研究个锤子了 有空多看看文档 比什么都强!!!!

  • Q :Asset Bundle 是否支持大厅加子游戏的模式?
    A :支持,子游戏的场景可以放在 Asset Bundle 中,在需要时加载,子游戏甚至可以在其它项目中预先以 Asset Bundle 的形式构建出来,然后在主项目中加载使用。

这个就说明了 可以 大厅子游戏 工程单独开发

原来是manifest文件出问题了,热更manifest一定要多检查。

是不是你周五的时候私聊我的。我讲了好几次了,可能是manifest的没有对应导致的。。

嗯嗯 谢谢,确实是manifest问题

跟着大佬学习