What problem does it solve?
This Skill prevents common, costly UniTask mistakes in Unity async code—double-await crashes, forgotten Forget(), wrong PlayerLoopTiming usage, cancellation misuse, and leak-prone subscriptions—by providing source-anchored design rules.
Core Features & Use Cases
- Guardrails for UniTask correctness: enforces struct single-await semantics and when to use Preserve() to avoid invalid double-await.
- Operational lifecycle rules: clarifies when to await, when to Forget(), and how exceptions flow through UniTaskScheduler.
- Timing, cancellation, and interop guidance: explains PlayerLoopTiming slots and correct cancellation token propagation patterns, including GetCancellationTokenOnDestroy and AttachExternalCancellation.
- Composable architecture for async systems: covers WhenAll/WhenAny patterns, AsyncOperation.ToUniTask, UniTask conversion from coroutines/enumerators, and async trigger usage.
- Leak prevention and review readiness: consolidates known pitfall patterns (tracker issues, subscription disposal, and enumerator termination) into an actionable checklist for PRs and onboarding.
Quick Start
Load the unity-unitask-design Skill before writing or reviewing any UniTask, UniTaskVoid, cancellation, timing, or conversion code in your Unity project.