unitask

Convert Unity coroutines and task-based async code into cancellable UniTask workflows.

3|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/OmerZeyveli/kinglet-unity --skill unitask-omerzeyveli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unitask
Source: https://github.com/OmerZeyveli/kinglet-unity/tree/main/.claude/skills/third-party/unitask
Command: npx skills add https://github.com/OmerZeyveli/kinglet-unity --skill unitask-omerzeyveli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill replaces Unity coroutines and standard task-based async code with efficient, cancellable UniTask workflows that integrate safely with the Unity PlayerLoop.

Core Features & Use Cases

  • Async Unity Operations: Implement zero-allocation delays, frame waits, scene loads, resource loads, web requests, and animation workflows.
  • Cancellation and Lifecycle Safety: Pass cancellation tokens consistently, cancel work when objects are destroyed or disabled, and handle expected cancellation separately from real errors.
  • Concurrency and Integration: Coordinate parallel operations with WhenAll and WhenAny, build async state machines, wrap callback APIs, and integrate with DOTween, Addressables, and async LINQ.
  • Use Case: Use this Skill to create a cancellable game bootstrap sequence that initializes services, loads player data, preloads assets, and transitions to a scene without continuing work after cancellation.

Quick Start

Use the unitask skill to convert this Unity coroutine into a cancellable UniTask method that uses the owning component's destruction token.

Frequently Asked Questions about unitask

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace Unity coroutines with cancellable async workflows?

Replace Unity coroutines with UniTask workflows to achieve zero-allocation async operations. This approach integrates with the Unity PlayerLoop, allowing you to use cancellation tokens for lifecycle safety and proper exception handling.

What is the best way to handle async cancellation tokens in Unity when objects are destroyed?

Handle async cancellation tokens in Unity by passing them consistently to UniTask workflows. You must cancel work when objects are destroyed or disabled, ensuring expected cancellations are handled separately from real errors.

Can I use UniTask with Addressables and DOTween for asynchronous asset loading and animations?

Yes, UniTask supports integrations with Addressables and DOTween. You can implement zero-allocation resource loads and animation workflows while maintaining cancellation token safety across these asynchronous operations.

How do I build a cancellable game bootstrap sequence in Unity?

Build a cancellable game bootstrap sequence in Unity using UniTask to initialize services, load player data, preload assets, and transition scenes. This prevents async work from continuing after cancellation.

Why use UniTask instead of standard task-based async code in Unity?

Use UniTask instead of standard task-based async code to avoid unsafe operations and reduce memory allocations. UniTask provides zero-allocation delays and frame waits while safely integrating with the Unity PlayerLoop.

How do I coordinate parallel async operations like WhenAll and WhenAny in Unity?

Coordinate parallel operations in Unity using UniTask's WhenAll and WhenAny methods. This allows you to build async state machines and wrap callback APIs while maintaining proper cancellation token handling.