| 12345678910111213141516171819 |
- using System;
- using Cysharp.Threading.Tasks;
- using HotPatch;
- using UnityEngine;
- using UnityEngine.Events;
- public sealed class AppStartup : MonoBehaviour
- {
- public UnityEvent onPatchReady;
- void Start() => LoadAsync().Forget(Debug.LogException);
- async UniTask LoadAsync()
- {
- await HotPatchService.LoadAndInitializeAsync(
- p => Debug.Log($"[HotPatch] {p.Stage}: {p.Value:P0}"), destroyCancellationToken);
-
-
- onPatchReady?.Invoke();
- }
- }
|