unity-async
Unity Async Strategy
Use this skill when the user is deciding how runtime work should be scheduled or cleaned up.
Guardrails
Mode: Both (Semi-Auto + Full-Auto) — advisory only, no REST skills
- Do not recommend
UniTaskjust because it looks more advanced than coroutine. - Prefer the simplest scheduling model that fits the use case.
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.
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
More from besty0728/unity-skills
unity-skills
Unity Editor automation via REST API — create scripts, analyze scenes, manage assets, control editor, and orchestrate workflows. Triggers: Unity, Unity Skills, in Unity, automate Unity, editor automation, create script, scene summary, build scene, 全自动模式, full auto, semi-auto, 半自动, Unity自动化, Unity编辑器, Unity技能, 操作Unity,在Unity中.
56unity-uitoolkit
UI Toolkit (UITK) for Unity — create/edit USS stylesheets and UXML layouts, configure UIDocument in scenes. Triggers: UI Toolkit, UITK, UXML, USS, UIDocument, PanelSettings, VisualElement, stylesheet, runtime UI, EditorWindow UI, 界面工具包, UI样式, 样式表, 可视化元素.
22unity-ui
Unity UI creation. Use when users want to create Canvas, Button, Text, Image, or other UI elements. Triggers: UI, canvas, button, text, image, panel, slider, toggle, UGUI, 界面, 按钮, 文本, 面板.
20unity-scriptableobject
ScriptableObject management. Use when users want to create, read, or modify ScriptableObject assets. Triggers: scriptableobject, SO, data asset, config, settings asset, 数据资产, 配置文件.
19unity-editor
Unity Editor control. Use when users want to enter play mode, select objects, undo/redo, or execute menu commands. Triggers: play, stop, pause, select, undo, redo, menu, editor, Unity编辑器, Unity播放, Unity撤销, Unity选择.
18unity-light
Unity lighting control. Use when users want to create or configure lights (Directional, Point, Spot, Area). Triggers: light, lighting, directional light, point light, spot light, shadows, intensity, 灯光, 光照, 阴影.
17