3using Cysharp.Threading.Tasks;
38 public CanvasGroup
cg;
49 cg.DOFade(1f, 0.1f).SetEase(Ease.InCubic).SetDelay(0.2f);
54 if (
onCancel !=
null && Input.GetKeyDown(KeyCode.Escape))
71 bar.value = Mathf.Clamp(
value, 0f, 1f);
94 layerProgress.useUnitask =
true;
95 layerProgress.unitask = task;
105 return layerProgress;
119 ThreadPool.QueueUserWorkItem(delegate
static void Start(string text, Action thread, Action onComplete)
static LayerProgress Start(string text, Action onComplete=null)
Func< bool > funcComplete
static LayerProgress StartAsync(string text, UniTask< bool > task, Action onCancel=null)