I couldn’t use the preview link directly as it says CORS, I am using visual studio code’s live server plugin to host the build file instead, I have taken a video of me starting the process from new project, being able to load the project if I provided the version and not able to load when I remove it. Can you see if I’ve done anything wrongly? Thanks
Just have a try to set up a remote resources server to upload the testBundle, that will avoid the CORS. Then click the button below, . That the different steps between you and me.
It’s not working whether I host using live server or host it on bitbucket, it only works if I build without the md5 cache or provide it with version number
I’ve uploaded to bitbucket, you can check it
cc.assetManager.loadBundle(‘https://saltemishel.bitbucket.io/testbundle/assets/testbundle’, { version: ‘b06d9’ }, (err, bundle) => {
if (err) {
console.error(“Failed to load bundle:”, err);
return;
}
console.log(bundle)
bundle.load(caca, cc.Prefab, function (err, prefab) {
let newNode = cc.instantiate(prefab);
newNode.x=100
newNode.y=100;
cc.director.getScene().addChild(newNode);
});
});