tools-unity-unitask

Implement zero-allocation UniTask async patterns with cancellation and coroutine interop in Unity.

6|1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/tjboudreaux/cc-plugin-unity-gamedev --skill tools-unity-unitask
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tools-unity-unitask
Source: https://github.com/tjboudreaux/cc-plugin-unity-gamedev/tree/main/skills/tools-unity-unitask
Command: npx skills add https://github.com/tjboudreaux/cc-plugin-unity-gamedev --skill tools-unity-unitask

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

UniTask enables Unity developers to implement asynchronous logic using async/await with zero allocations, lifecycle integration, and reliable cancellation. It replaces brittle coroutines with a predictable, testable pattern that integrates with MonoBehaviour lifecycle and error handling.

Core Features & Use Cases

  • Zero-allocation async/await integration for Unity
  • Cancellation patterns including destroy tokens and linked tokens
  • Lifecycle-aware tasks that auto-cancel on object destruction
  • Coroutine interop and bridging UniTask with existing code
  • Progress reporting and timeouts for long-running operations

Quick Start

Create a MonoBehaviour and start an async UniTask method using await to initialize systems after a short delay.

Frequently Asked Questions about tools-unity-unitask

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

FAQPage Schema
How do I use async-await in Unity without generating garbage allocations?

Async-await in Unity can run with zero allocations by using UniTask-based await patterns, which bypass standard C# task overhead and prevent garbage collection spikes during asset loading or network calls.

What is the best way to handle async cancellation when a GameObject is destroyed?

Handling async cancellation upon GameObject destruction requires lifecycle-aware tasks that utilize destroy tokens. This ensures long-running async operations automatically cancel when the associated MonoBehaviour is removed from the scene.

How do I track progress and set timeouts for long-running async tasks in Unity?

Tracking progress and setting timeouts for long-running Unity tasks involves UniTask's built-in progress reporting and timeout features. These mechanisms prevent async workflows from hanging indefinitely during heavy asset loading.

Can I link multiple cancellation tokens together for complex Unity async workflows?

Complex Unity async workflows support linked cancellation tokens, combining destroy tokens with custom logical triggers. This ensures tasks cancel immediately if either the object is destroyed or an external condition is met.

Does UniTask work with existing Unity coroutines?

UniTask provides seamless coroutine interop, allowing you to bridge existing coroutine code with async-await workflows. This lets you migrate brittle coroutines into predictable, testable async methods incrementally.