cocos creator VM20:202 createDownloadTask:fail exceed max download connection count

微信、手Q 网络并发数超过限制,先用个空场景加载,绑定个脚本预加载,附上代码

private progressNum: number = 0;
loadComplete: boolean = false;

start () {
cc.log("进入加载");
this.loadScene("main");
}

update(dt){
if(this.loadComplete == true)
{
this.loadComplete =false;
this.SceneChange();
}

}


SceneChange()
{
cc.director.loadScene("main");
}

loadScene(scene: string) {
let self = this;
cc.director.preloadScene(scene,
function (completedCount, totalCount, item) {
if(completedCount / totalCount > self.progressNum){
self.progressNum = completedCount / totalCount;
cc.log("加载进度"+self.progressNum);
}
},
function () {
self.loadComplete = true;
});

 

就是那个分包下载会报错的问题见https://blog.csdn.net/u013654125/article/details/99412462,看问题原因可以看看
}

你可能感兴趣的:(CocosCreator,creator,ts,微信,手Q)