3.x版本加载场景时没有提供进度的地方,看别人说用cc.loader.onProgress,但这个loader已经被弃用了咋搞?

:joy:

我是这么用的:
start () {
director.preloadScene(“scene/game”, this.onProgress.bind(this), function(){
console.log(“加载完成!”);
director.loadScene(“scene/game”);
})
}

onProgress(completedCount:any, totalCount:any, item:any){
    this.pro=find("Canvas/preload");
    this.pro.getChildByName("str").getComponent(Label).string = Math.floor(completedCount/totalCount * 100) + "%";
}

这个在微信小游戏中不能用吧,直接就到100%