unity-async

Advises on Unity runtime scheduling choices among Update, coroutines, and UniTask.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-async-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-async
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/async
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-async-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity developers often struggle to choose between Update loops, coroutines, and UniTask for runtime work, leading to over-engineered async code, leaked subscriptions, and unclear cancellation ownership. ## Core Features & Use Cases - Decision Ladder: Walks through whether per-frame work is needed at all, preferring events and callbacks before coroutines, and UniTask only when the project already uses it. - Lifecycle Ownership Guidance: Defines who starts, cancels, and cleans up work, favoring OnEnable/OnDisable/OnDestroy symmetry over cargo-cult IDisposable usage. - Use Case: When adding a timed UI fade or polling loop to a MonoBehaviour, consult this Skill to determine whether a coroutine, event callback, or Update method is the right fit and who owns its cancellation. ## Quick Start Ask the assistant to recommend a scheduling model for a Unity runtime task, such as whether to use a coroutine, UniTask, or Update for a specific behavior.

Frequently Asked Questions about unity-async

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

FAQPage Schema
How do I choose between coroutine and UniTask in Unity?

Prefer coroutines for short Unity-bound sequences, and choose UniTask only when the project already uses it or the team explicitly accepts the dependency. Do not adopt UniTask just because it appears more advanced than coroutines.

When should I use Update versus events in Unity?

Use Update only for true continuous simulation, polling, or input loops that cannot be event-driven. If the task does not need per-frame work, prefer events, callbacks, or explicit method calls instead.

How should cancellation and cleanup be handled in Unity async code?

Always define lifecycle ownership: who starts the work, who cancels or stops it, and when it is cleaned up. In MonoBehaviour, prefer OnEnable, OnDisable, and OnDestroy for subscribe-unsubscribe symmetry.

Should I use IDisposable instead of Unity lifecycle methods?

Use IDisposable mainly for pure C# lifetimes, temporary subscriptions, or scope-based cleanup helpers. It should not be a cargo-cult replacement for Unity lifecycle methods like OnDisable and OnDestroy.

Does this skill cover Unity REST job polling with jobId?

No, this module covers only async code written into the Unity runtime such as Update, coroutines, and UniTask. For REST protocol async jobs, jobId polling, and job_status endpoints, see the separate batch module.