同步GameApp、Procedure里简化IUpdateDriver的调用

This commit is contained in:
Alex-Rachel
2025-03-20 11:53:35 +08:00
parent 14bbb993f8
commit 2e27941755
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ public partial class GameApp
_hotfixAssembly = (List<Assembly>)objects[0];
Log.Warning("======= 看到此条日志代表你成功运行了热更新代码 =======");
Log.Warning("======= Entrance GameApp =======");
ModuleSystem.GetModule<IUpdateDriver>().AddDestroyListener(Release);
Utility.Unity.AddDestroyListener(Release);
StartGameLogic();
}

View File

@@ -23,7 +23,7 @@ namespace Procedure
LauncherMgr.Show(UIDefine.UILoadUpdate, "初始化资源中...");
// 注意:使用单机模式并初始化资源前,需要先构建 AssetBundle 并复制到 StreamingAssets 中,否则会产生 HTTP 404 错误
ModuleSystem.GetModule<IUpdateDriver>().StartCoroutine(InitResources(procedureOwner));
Utility.Unity.StartCoroutine(InitResources(procedureOwner));
}
protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
@@ -88,7 +88,7 @@ namespace Procedure
LoadStyle.StyleEnum.Style_Retry
, () =>
{
ModuleSystem.GetModule<IUpdateDriver>().StartCoroutine(InitResources(procedureOwner));
Utility.Unity.StartCoroutine(InitResources(procedureOwner));
}, UnityEngine.Application.Quit);
}
}