Skip to content

Commit f07cdf8

Browse files
committed
回调函数绑定顺序已调整,以防止在资源下载前设置回调
1 parent 8f7e22e commit f07cdf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CrazyCarClient/Assets/Scripts/UI/Login/DownloadResUI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ private async void Start() {
5454
}
5555

5656
private void DownloadRes() {
57-
this.GetSystem<IAddressableSystem>().GetDownloadAssets();
58-
5957
this.GetSystem<IAddressableSystem>().SetCallBack(
6058
OnCheckCompleteNeedUpdate: (size) => {
6159
Debug.Log("需要更新");
@@ -74,6 +72,8 @@ private void DownloadRes() {
7472
UpdateProgress(percent, tatalSize);
7573
} catch { }
7674
});
75+
76+
this.GetSystem<IAddressableSystem>().GetDownloadAssets();
7777
}
7878

7979
private void FinishDownloadRes(bool isFinish) {

0 commit comments

Comments
 (0)