-
Creator 版本:2.4.0-rc.1
想请问关于AssetBundle更新的问题,是否允许更新?
使用cc.assetManager.loadBundle下载remote bundle之后,我尝试修改某张图片并重新建置产生新的remote并上传。
查看config.xxxxx.json的md5以及该图片皆有更改,但实际再次使用cc.assetManager.loadBundle要去下载bundle,发现bundle内容并未更新。
我参照教学,如下增加version参数,结果也是一样。cc.assetManager.loadBundle(‘01_graphics’, { version: ‘fbc07’ }, function (err, bundle) {
if (err) {
return console.error(err);
}
console.log(‘load bundle successfully.’);
});
我想请问是我哪里操作有问题吗,或是有人实际操作的结果是可以更新的呢?
并且我查照 cocos2d-jsb.js 的内容发现关于bundle 的下载,只要下载过就不会去远端下载。
loadBundle: function loadBundle(nameOrUrl, options, onComplete) {
var _parseParameters6 = parseParameters(options, void 0, onComplete), options = _parseParameters6.options, onComplete = _parseParameters6.onComplete;
var bundleName = cc.path.basename(nameOrUrl);
console.log((`cocos2d-jsb(loadBundle) ${bundleName} ${this.bundles.has(bundleName)}`));
if (this.bundles.has(bundleName)) return asyncify(onComplete)(null, this.getBundle(bundleName));
options.preset = options.preset || "bundle";
options.ext = "bundle";
this.loadRemote(nameOrUrl, options, onComplete);
},