unity-async

Advise on asynchronous scheduling and lifecycle cleanup for Unity runtime tasks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mandexonla/Top-Down-Template --skill unity-async-mandexonla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-async
Source: https://github.com/mandexonla/Top-Down-Template/tree/main/.codex/skills/unity-skills/skills/async
Command: npx skills add https://github.com/mandexonla/Top-Down-Template --skill unity-async-mandexonla

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers decide how to schedule, run, and clean up asynchronous or repeated work in Unity projects, clarifying when to use Update, coroutines, UniTask, timers, or plain events and how to own cancellation and lifecycle.

Core Features & Use Cases

  • Decision Ladder: Walks through determining whether work needs per-frame updates, short Unity-bound sequences, or background async flows.
  • Lifecycle Ownership: Advises who should start, cancel, and clean up work (OnEnable/OnDisable/OnDestroy symmetry, IDisposable use cases).
  • Trade-offs & Performance: Explains hot-path risks of Update, when coroutines are simplest, and when UniTask is justified by project dependency needs.
  • Use Case: Choose between Update for continuous input polling, coroutines for short sequences and timed events, timers for detached scheduling, and UniTask when the project already depends on async/await utilities.

Quick Start

Recommend whether to use Update, coroutine, UniTask, or a timer for a given Unity task and specify lifecycle ownership and cancellation strategy.

Frequently Asked Questions about unity-async

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

FAQPage Schema
When should I use Unity coroutines vs async await for async scheduling?

Use Unity coroutines for short Unity-bound sequences and timed events, and choose async await when your project already depends on UniTask for background async flows.

How do I handle async cancellation and lifecycle cleanup in Unity MonoBehaviour?

Handle async cancellation in Unity MonoBehaviour by maintaining OnEnable and OnDisable symmetry, ensuring the owner starts, cancels, and cleans up tasks through OnDestroy or IDisposable.

What is the performance impact of using Update loops for continuous work in Unity?

Using Update loops for continuous work in Unity creates hot-path performance risks, making it best suited for continuous input polling rather than detached scheduling or background tasks.

Do I need to add UniTask to my Unity project for async workflows?

You need to add UniTask to your Unity project only when dependency trade-offs justify it, specifically when the project requires structured async await workflows over simpler coroutine sequences.

How do I choose between Update, timers, and coroutines for Unity runtime tasks?

Choose Update for continuous input polling, timers for detached scheduling, and coroutines for short sequences, walking through a decision ladder based on whether work needs per-frame updates or Unity-bound flows.