【m】优化卸载加载逻辑
This commit is contained in:
@@ -50,7 +50,7 @@ namespace Stary.Evo
|
||||
await FsmSystem.SetCurState(nameof(ResEditorSimulateState));
|
||||
#elif HOST_PLAYMODE
|
||||
//登录
|
||||
if (((FsmLoadSystem)FsmSystem).IsLogin)
|
||||
if ((AppConfig.IsLogin))
|
||||
{
|
||||
await GetServerVersion();
|
||||
await HOST_PLAYMODE(package);
|
||||
@@ -99,16 +99,6 @@ namespace Stary.Evo
|
||||
#endif
|
||||
}
|
||||
|
||||
public override UniTask OnEnterAsync<T>(T param)
|
||||
{
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override UniTask OnEnterAsync<T1, T2>(T1 param1, T2 param2)
|
||||
{
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override UniTask OnExitAsync()
|
||||
{
|
||||
return UniTask.CompletedTask;
|
||||
@@ -431,11 +421,9 @@ namespace Stary.Evo
|
||||
// // 等一帧,让系统真正释放句柄
|
||||
// await UniTask.DelayFrame(1);
|
||||
// }
|
||||
|
||||
FsmLoadSystem loadSystem = FsmSystem as FsmLoadSystem;
|
||||
if (loadSystem != null && loadSystem.ProgressBarPanel == null)
|
||||
if (DomainAssetSystem.ProgressBarPanel == null)
|
||||
{
|
||||
loadSystem.ProgressBarPanel = Object.Instantiate(Resources.Load<GameObject>("ProgressBarPanel"),
|
||||
DomainAssetSystem.ProgressBarPanel = Object.Instantiate(Resources.Load<GameObject>("ProgressBarPanel"),
|
||||
Camera.main.transform).GetOrAddComponent<ProgressBarPanel>();
|
||||
}
|
||||
|
||||
@@ -445,17 +433,15 @@ namespace Stary.Evo
|
||||
private void DownLoadProgress(float progress)
|
||||
{
|
||||
Debug.Log($"下载进度:{progress:P0}");
|
||||
FsmLoadSystem loadSystem = FsmSystem as FsmLoadSystem;
|
||||
if (loadSystem != null)
|
||||
loadSystem.ProgressBarPanel.SetProgressBarValue("下载中", progress);
|
||||
|
||||
DomainAssetSystem.ProgressBarPanel.SetProgressBarValue("下载中", progress);
|
||||
}
|
||||
|
||||
private void UnzipProgress(float progress)
|
||||
{
|
||||
Debug.Log($"解压进度:{progress:P0}");
|
||||
FsmLoadSystem loadSystem = FsmSystem as FsmLoadSystem;
|
||||
if (loadSystem != null)
|
||||
loadSystem.ProgressBarPanel.SetProgressBarValue("解压中", progress);
|
||||
|
||||
DomainAssetSystem.ProgressBarPanel.SetProgressBarValue("解压中", progress);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user