22 lines
718 B
C#
22 lines
718 B
C#
|
|
using Cysharp.Threading.Tasks;
|
||
|
|
using YooAsset;
|
||
|
|
|
||
|
|
namespace Tuan.GameFramework
|
||
|
|
{
|
||
|
|
public class PatchManager : Singleton<PatchManager>
|
||
|
|
{
|
||
|
|
public async UniTask<bool> StartOperation(EPlayMode playMode)
|
||
|
|
{
|
||
|
|
YooAssets.Initialize();
|
||
|
|
PreloadOperation _preloadOperation = new PreloadOperation(playMode);
|
||
|
|
await _preloadOperation.Execute();
|
||
|
|
|
||
|
|
MainOperation _mainOperation = new MainOperation(playMode);
|
||
|
|
await _mainOperation.Execute();
|
||
|
|
await HotDllLoader.Inst.LoadDepDll(YooAssets.GetPackage("Main"));
|
||
|
|
await HotDllLoader.Inst.LoadDll(YooAssets.GetPackage("Main"), "GameScripts.Main");
|
||
|
|
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|