/dotween-design
Source-anchored design rules for DOTween 1.3.015. 为 DOTween 1.3.015 提供源码锚定的设计规则。
$ npx -y skills add Besty0728/Unity-Skills --skill dotween-design --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/dotween-design
Context preview
The summary Claude sees to decide when to auto-load this skill.
Source-anchored design rules for DOTween 1.3.015. 为 DOTween 1.3.015 提供源码锚定的设计规则。
SKILL.md
dotween-design.SKILL.mdname: unity-dotween-design
description: Source-anchored design rules for DOTween 1.3.015. 为 DOTween 1.3.015 提供源码锚定的设计规则。
Triggers
- Writing or reviewing DOTween code
- Building sequences
- Binding tween lifetime
- Debugging tween pitfalls
- 编写或审查 DOTween 代码、构建序列动画、绑定补间生命周期、排查补间陷阱
DOTween - Design Rules
Advisory module. Every rule is distilled from Demigiant DOTween source at:
- **1.3.015** — bundled in `_DOTween.Assembly/DOTween/` and `bin/Modules/` module files (Unity 2018+)
Each rule cites a concrete file/line so the reasoning is auditable and the AI does not improvise against stale memory.
> **Mode**: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).
When to Load This Module
Load before writing or reviewing any of:
- `DOTween.Init(...)` bootstrap, DOTweenSettings configuration, SetTweensCapacity adjustments
- Any `.DOMove / .DORotate / .DOScale / .DOColor / .DOFade / .DOShake* / .DOPath / .DOPunch*` shortcut call
- `DOTween.Sequence()` + `.Append / .Join / .Insert / .Prepend / .AppendInterval / .PrependInterval / .AppendCallback`
- `.SetEase / .SetDelay / .SetLoops / .SetAutoKill / .SetLink / .SetId / .SetTarget / .SetUpdate / .SetRelative / .SetRecyclable / .SetSpeedBased`
- `.OnStart / .OnUpdate / .OnStepComplete / .OnComplete / .OnKill / .OnPlay / .OnPause / .OnRewind`
- `.AsyncWaitForCompletion / .AsyncWaitForKill / .AsyncWaitForRewind / .AsyncWaitForElapsedLoops / .AsyncWaitForPosition`
- `tween.ToUniTask(TweenCancelBehaviour, CancellationToken)` (UniTask bridge)
- `DOTween.Kill(target, complete)` / `DOTween.KillAll()` batch operations
- Safe Mode debugging — `useSafeMode`, `safeModeLogBehaviour`, `nestedTweenFailureBehaviour`
- DOTween Module generation (Audio / Physics / Physics2D / Sprite / UI / UnityUI / TextMeshPro)
Critical Rule Summary
| # | Rule | Source anchor | |---|------|---------------| | 1 | `DOTween.Init(recycleAllByDefault, useSafeMode, logBehaviour)` returns `IDOTweenInit` for fluent `.SetCapacity(...)`. If not called explicitly, Auto-init runs on first tween creation (`AutoInit` at `DOTween.cs:236`). `DOTween.Version = "1.3.015"` is exposed as a const. | `DOTween.cs:38,227,236,243` | | 2 | Every tween is driven by a single `[DOTween]` GameObject MonoBehaviour (`DOTweenComponent`) marked `DontDestroyOnLoad`. It is created on first init and survives scene loads. Don't destroy it — `DOTween.Clear(destroy: true)` is the only supported teardown. | `DOTweenComponent.cs:268-270`, `DOTween.cs:311` | | 3 | **Default `autoKill = true`**: tween is killed on completion. After kill, calls like `.Restart()` / `.Kill()` / `.Complete()` are no-ops (Safe Mode) or NullReferenceException (Safe Mode off). Use `.SetAutoKill(false)` to keep tween alive for replay. | `DOTween.cs useSafeMode:49`, `TweenSettingsExtensions.cs:39,49` | | 4 | **Safe Mode is ON by default** (`useSafeMode = true`). Target destroyed while tween plays → Safe Mode catches the exception and logs per `safeModeLogBehaviour` (default: Warning). Disable Safe Mode to locate missing-link bugs during development. | `DOTween.cs:49,51` | | 5 | `SetLink(gameObject, LinkBehaviour)` binds tween lifecycle to a GameObject. Default `LinkBehaviour.KillOnDestroy`. Without `SetLink`, tween continues running after target is destroyed and relies on Safe Mode for protection. | `TweenSettingsExtensions.cs:91,103`, `LinkBehaviour.cs` | | 6 | `SetTarget(object target)` is required for `DOTween.Kill(target)` / `DOTween.KillAll(target)` grouping. Shortcut extensions (`.DOMove`, `.DOFade`, etc.) set target automatically; manual `DOTween.To(...)` does NOT. | `TweenSettingsExtensions.cs:116`, `DOTween.cs:884,892` | | 7 | `Sequence.Append(t)` runs after previous. `Sequence.Join(t)` runs in parallel with previous. `Sequence.Insert(float atPosition, t)` inserts at absolute time. `Sequence.Prepend(t)` pushes to front, shifting existing. | `TweenSettingsExtensions.cs:499,508,517,528` | | 8 | `AsyncWaitForCompletion / AsyncWaitForKill / AsyncWaitForRewind` live in `DOTweenModuleUnityVersion.cs` (MODULE file, gated by `UNITY_2018_1_OR_NEWER && (NET_4_6 || NET_STANDARD_2_0)`). If Modules are not generated (Tools → DOTween Utility Panel → Create ASMDEF), these APIs don't exist. | `bin/Modules/DOTweenModuleUnityVersion.cs:216,244,230` | | 9 | UniTask bridge `tween.ToUniTask(TweenCancelBehaviour, CancellationToken)` lives in UniTask's `External/DOTween/` extensions and is the **recommended** await path over `AsyncWaitForCompletion`. `TweenCancelBehaviour` has 9 values (Kill / Complete / CancelAwait / KillAndCancelAwait / ...). | UniTask `DOTweenAsyncExtensions.cs:14-27,54` | | 10 | `Ease` enum has **38 entries** (36 user-facing + 2 reserved `INTERNAL_*`): `Unset / Linear` + In/Out/InOut variants of Sine/Quad/Cubic/Quart/Quint/Expo/Circ/Elastic/Back/Bounce (10 × 3 = 30 math eases) + `Flash / InFlash / OutFlash / InOutFlash`. `INTERNAL_Zero` and `INTERNAL_Custom` are auto-assigned by DOTween for zero-duration and AnimationCurve-based tweens. | `Ease.cs:9-53` |
Sub-doc Routing
| Sub-doc | When to read | |---------|--------------| | [BASICS.md](./BASICS.md) | `DOTween.Init`, driver GameObject, DOTweenSettings asset, Modules architecture, Safe Mode, tween capacity | | [TWEEN.md](./TWEEN.md) | Tween base class, Tweener vs Sequence, autoKill, Play/Pause/Rewind/Restart/Kill/Complete/Goto lifecycle | | [SEQUENCE.md](./SEQUENCE.md) | `Sequence.Append / Join / Insert / Prepend / AppendInterval / PrependInterval / AppendCallback / InsertCallback`, nesting, loop composition | | [SHORTCUTS.md](./SHORTCUTS.md) | `.DOMove / DOLocalMove / DOAnchorPos / DORotate / DOScale / DOColor / DOFade / DOPath / DOJump / DOPunch / DOShake*` cheat sheet by target type | | [EASE.md](./EASE.md) | Full `Ease` enum, `SetEase` overloads (Ease / amplitude+period / AnimationCurve / EaseFunction), Flash family, Elastic/Back overshoot | | [LIFETIME.md](./LIFETIME.md) | `SetAutoKill / SetLink / Set
Read more
name: unity-dotween-design description: Source-anchored design rules for DOTween 1.3.015. 为 DOTween 1.3.015 提供源码锚定的设计规则。
Triggers
- Writing or reviewing DOTween code
- Building sequences
- Binding tween lifetime
- Debugging tween pitfalls
- 编写或审查 DOTween 代码、构建序列动画、绑定补间生命周期、排查补间陷阱
DOTween - Design Rules
Advisory module. Every rule is distilled from Demigiant DOTween source at:
- **1.3.015** — bundled in `_DOTween.Assembly/DOTween/` and `bin/Modules/` module files (Unity 2018+)
Each rule cites a concrete file/line so the reasoning is auditable and the AI does not improvise against stale memory.
> **Mode**: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).
When to Load This Module
Load before writing or reviewing any of:
- `DOTween.Init(...)` bootstrap, DOTweenSettings configuration, SetTweensCapacity adjustments
- Any `.DOMove / .DORotate / .DOScale / .DOColor / .DOFade / .DOShake* / .DOPath / .DOPunch*` shortcut call
- `DOTween.Sequence()` + `.Append / .Join / .Insert / .Prepend / .AppendInterval / .PrependInterval / .AppendCallback`
- `.SetEase / .SetDelay / .SetLoops / .SetAutoKill / .SetLink / .SetId / .SetTarget / .SetUpdate / .SetRelative / .SetRecyclable / .SetSpeedBased`
- `.OnStart / .OnUpdate / .OnStepComplete / .OnComplete / .OnKill / .OnPlay / .OnPause / .OnRewind`
- `.AsyncWaitForCompletion / .AsyncWaitForKill / .AsyncWaitForRewind / .AsyncWaitForElapsedLoops / .AsyncWaitForPosition`
- `tween.ToUniTask(TweenCancelBehaviour, CancellationToken)` (UniTask bridge)
- `DOTween.Kill(target, complete)` / `DOTween.KillAll()` batch operations
- Safe Mode debugging — `useSafeMode`, `safeModeLogBehaviour`, `nestedTweenFailureBehaviour`
- DOTween Module generation (Audio / Physics / Physics2D / Sprite / UI / UnityUI / TextMeshPro)
Critical Rule Summary
| # | Rule | Source anchor | |---|------|---------------| | 1 | `DOTween.Init(recycleAllByDefault, useSafeMode, logBehaviour)` returns `IDOTweenInit` for fluent `.SetCapacity(...)`. If not called explicitly, Auto-init runs on first tween creation (`AutoInit` at `DOTween.cs:236`). `DOTween.Version = "1.3.015"` is exposed as a const. | `DOTween.cs:38,227,236,243` | | 2 | Every tween is driven by a single `[DOTween]` GameObject MonoBehaviour (`DOTweenComponent`) marked `DontDestroyOnLoad`. It is created on first init and survives scene loads. Don't destroy it — `DOTween.Clear(destroy: true)` is the only supported teardown. | `DOTweenComponent.cs:268-270`, `DOTween.cs:311` | | 3 | **Default `autoKill = true`**: tween is killed on completion. After kill, calls like `.Restart()` / `.Kill()` / `.Complete()` are no-ops (Safe Mode) or NullReferenceException (Safe Mode off). Use `.SetAutoKill(false)` to keep tween alive for replay. | `DOTween.cs useSafeMode:49`, `TweenSettingsExtensions.cs:39,49` | | 4 | **Safe Mode is ON by default** (`useSafeMode = true`). Target destroyed while tween plays → Safe Mode catches the exception and logs per `safeModeLogBehaviour` (default: Warning). Disable Safe Mode to locate missing-link bugs during development. | `DOTween.cs:49,51` | | 5 | `SetLink(gameObject, LinkBehaviour)` binds tween lifecycle to a GameObject. Default `LinkBehaviour.KillOnDestroy`. Without `SetLink`, tween continues running after target is destroyed and relies on Safe Mode for protection. | `TweenSettingsExtensions.cs:91,103`, `LinkBehaviour.cs` | | 6 | `SetTarget(object target)` is required for `DOTween.Kill(target)` / `DOTween.KillAll(target)` grouping. Shortcut extensions (`.DOMove`, `.DOFade`, etc.) set target automatically; manual `DOTween.To(...)` does NOT. | `TweenSettingsExtensions.cs:116`, `DOTween.cs:884,892` | | 7 | `Sequence.Append(t)` runs after previous. `Sequence.Join(t)` runs in parallel with previous. `Sequence.Insert(float atPosition, t)` inserts at absolute time. `Sequence.Prepend(t)` pushes to front, shifting existing. | `TweenSettingsExtensions.cs:499,508,517,528` | | 8 | `AsyncWaitForCompletion / AsyncWaitForKill / AsyncWaitForRewind` live in `DOTweenModuleUnityVersion.cs` (MODULE file, gated by `UNITY_2018_1_OR_NEWER && (NET_4_6 || NET_STANDARD_2_0)`). If Modules are not generated (Tools → DOTween Utility Panel → Create ASMDEF), these APIs don't exist. | `bin/Modules/DOTweenModuleUnityVersion.cs:216,244,230` | | 9 | UniTask bridge `tween.ToUniTask(TweenCancelBehaviour, CancellationToken)` lives in UniTask's `External/DOTween/` extensions and is the **recommended** await path over `AsyncWaitForCompletion`. `TweenCancelBehaviour` has 9 values (Kill / Complete / CancelAwait / KillAndCancelAwait / ...). | UniTask `DOTweenAsyncExtensions.cs:14-27,54` | | 10 | `Ease` enum has **38 entries** (36 user-facing + 2 reserved `INTERNAL_*`): `Unset / Linear` + In/Out/InOut variants of Sine/Quad/Cubic/Quart/Quint/Expo/Circ/Elastic/Back/Bounce (10 × 3 = 30 math eases) + `Flash / InFlash / OutFlash / InOutFlash`. `INTERNAL_Zero` and `INTERNAL_Custom` are auto-assigned by DOTween for zero-duration and AnimationCurve-based tweens. | `Ease.cs:9-53` |
Sub-doc Routing
| Sub-doc | When to read | |---------|--------------| | [BASICS.md](./BASICS.md) | `DOTween.Init`, driver GameObject, DOTweenSettings asset, Modules architecture, Safe Mode, tween capacity | | [TWEEN.md](./TWEEN.md) | Tween base class, Tweener vs Sequence, autoKill, Play/Pause/Rewind/Restart/Kill/Complete/Goto lifecycle | | [SEQUENCE.md](./SEQUENCE.md) | `Sequence.Append / Join / Insert / Prepend / AppendInterval / PrependInterval / AppendCallback / InsertCallback`, nesting, loop composition | | [SHORTCUTS.md](./SHORTCUTS.md) | `.DOMove / DOLocalMove / DOAnchorPos / DORotate / DOScale / DOColor / DOFade / DOPath / DOJump / DOPunch / DOShake*` cheat sheet by target type | | [EASE.md](./EASE.md) | Full `Ease` enum, `SetEase` overloads (Ease / amplitude+period / AnimationCurve / EaseFunction), Flash family, Elastic/Back overshoot | | [LIFETIME.md](./LIFETIME.md) | `SetAutoKill / SetLink / Set
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

