Skip to content

Commit 866c440

Browse files
committed
add:初始化Package流程中增加webgl平台更新update配置
1 parent 48ff839 commit 866c440

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

UnityProject/Assets/GameScripts/Main/Procedure/ProcedureInitPackage.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected override void OnEnter(ProcedureOwner procedureOwner)
2929

3030
private async UniTaskVoid InitPackage(ProcedureOwner procedureOwner)
3131
{
32-
if (GameModule.Resource.PlayMode == EPlayMode.HostPlayMode)
32+
if (GameModule.Resource.PlayMode == EPlayMode.HostPlayMode ||
33+
GameModule.Resource.PlayMode == EPlayMode.WebPlayMode)
3334
{
3435
if (SettingsUtils.EnableUpdateData())
3536
{
@@ -44,7 +45,8 @@ private async UniTaskVoid InitPackage(ProcedureOwner procedureOwner)
4445

4546
if (!string.IsNullOrEmpty(updateData.FallbackHostServerURL))
4647
{
47-
SettingsUtils.FrameworkGlobalSettings.FallbackHostServerURL = updateData.FallbackHostServerURL;
48+
SettingsUtils.FrameworkGlobalSettings.FallbackHostServerURL =
49+
updateData.FallbackHostServerURL;
4850
}
4951
}
5052
}
@@ -60,9 +62,9 @@ private async UniTaskVoid InitPackage(ProcedureOwner procedureOwner)
6062
{
6163
//热更新阶段文本初始化
6264
LoadText.Instance.InitConfigData(null);
63-
65+
6466
GameEvent.Send(RuntimeId.ToRuntimeId("RefreshVersion"));
65-
67+
6668
EPlayMode playMode = GameModule.Resource.PlayMode;
6769

6870
// 编辑器模式。
@@ -107,7 +109,9 @@ private async UniTaskVoid InitPackage(ProcedureOwner procedureOwner)
107109
// 打开启动UI。
108110
UILoadMgr.Show(UIDefine.UILoadUpdate, $"资源初始化失败!");
109111

110-
UILoadTip.ShowMessageBox($"资源初始化失败!点击确认重试 \n \n <color=#FF0000>原因{initializationOperation.Error}</color>", MessageShowType.TwoButton,
112+
UILoadTip.ShowMessageBox(
113+
$"资源初始化失败!点击确认重试 \n \n <color=#FF0000>原因{initializationOperation.Error}</color>",
114+
MessageShowType.TwoButton,
111115
LoadStyle.StyleEnum.Style_Retry
112116
, () => { Retry(procedureOwner); }, UnityEngine.Application.Quit);
113117
}

0 commit comments

Comments
 (0)