Commit a1fa8aeb authored by rockyl's avatar rockyl

修复没有素材待加载时展示加载视图的情况

parent d5201788
...@@ -229,15 +229,17 @@ export class GameStage extends Node { ...@@ -229,15 +229,17 @@ export class GameStage extends Node {
groups[viewConfig.uuid] = depAssets; groups[viewConfig.uuid] = depAssets;
} }
} }
await loadAssetsGroups(groups, async () => { if(Object.keys(groups).length > 0){
if (showLoadingView) { await loadAssetsGroups(groups, async () => {
await this.showInnerLoadingView(); if (showLoadingView) {
} await this.showInnerLoadingView();
}, async () => { }
if (showLoadingView) { }, async () => {
this.hideInnerLoadingView(); if (showLoadingView) {
} this.hideInnerLoadingView();
}); }
});
}
} }
view = instantiate(viewConfig); view = instantiate(viewConfig);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment