AlicizaX/Client/Assets/Scripts/Startup/Procedure/ProcedurePatchDoneState.cs

29 lines
733 B
C#
Raw Normal View History

2026-04-14 11:24:09 +08:00
using AlicizaX;
2025-04-28 19:45:45 +08:00
using Cysharp.Threading.Tasks;
2025-01-24 16:21:00 +08:00
using UnityEngine;
using YooAsset;
namespace Unity.Startup.Procedure
{
2025-11-18 16:15:26 +08:00
internal sealed class ProcedurePatchDoneState : ProcedureBase
2025-01-24 16:21:00 +08:00
{
2025-04-28 19:45:45 +08:00
protected override void OnEnter()
2025-01-24 16:21:00 +08:00
{
2025-04-28 19:45:45 +08:00
ClearCacheFilesOperation operation = GameApp.Resource.ClearCacheFilesAsync(EFileClearMode.ClearUnusedBundleFiles);
2025-01-24 16:21:00 +08:00
operation.Completed += ClearCacheCompleted;
}
2025-04-28 19:45:45 +08:00
2025-01-24 16:21:00 +08:00
private void ClearCacheCompleted(AsyncOperationBase obj)
{
2025-01-26 20:55:39 +08:00
Log.Info($"清理包裹缓存完成");
2026-04-14 11:24:09 +08:00
#if ENABLE_HYBRIDCLR
2025-11-18 16:15:26 +08:00
SwitchProcedure<ProcedureLoadAssembly>();
2026-04-14 11:24:09 +08:00
#else
SwitchProcedure<ProcedureUpdateFinishState>();
#endif
2025-01-24 16:21:00 +08:00
}
}
}