unity-async
SKILL.md
Unity Async Strategy
Use this skill when the user is deciding how runtime work should be scheduled or cleaned up.
Decision Ladder
- First ask whether the task needs per-frame work at all.
- If not, prefer events, callbacks, or explicit method calls.
- If a short Unity-bound sequence is needed, prefer coroutine.
- Recommend
UniTaskonly when:- the project already uses it, or
- the user explicitly wants it and accepts the dependency.
- Use
Updateonly for true continuous simulation, polling, or input loops that cannot be event-driven.
Do not recommend UniTask just because it looks more advanced than coroutine.
Specific Guidance
- Avoid many unrelated
Updatemethods if a more event-driven flow works. - Cache references used in hot paths.
- Always define lifecycle ownership:
- who starts the work
- who cancels or stops it
- when it is cleaned up
- In
MonoBehaviour, preferOnEnable/OnDisable/OnDestroyfor subscribe-unsubscribe symmetry. - Use
IDisposablemainly for pure C# lifetimes, temporary subscriptions, or scope-based cleanup helpers, not as a cargo-cult replacement for Unity lifecycle methods.
Output Format
- Recommended scheduling model
- Why it fits
- Lifecycle / cancellation owner
- Hot-path risks
- Why the heavier alternative is unnecessary, if applicable
Weekly Installs
4
Repository
besty0728/unity-skillsGitHub Stars
435
First Seen
3 days ago
Security Audits
Installed on
amp3
cline3
opencode3
cursor3
kimi-cli3
codex3