[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79QGQ3FVQAX39Q6Y6NPAJRY":3,"skill-same:01M79QGQ3FVQAX39Q6Y6NPAJRY":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79QGQ3FVQAX39Q6Y6NPAJRY","unity-animation",null,"Drive Unity 6.3 LTS character animation with Animator Controllers: states, transitions, parameters, blend trees, animation layers, and humanoid Avatar IK. Use when wiring an Animator, setting parameters from script (SetFloat\u002FSetBool\u002FSetTrigger), building blend trees, or when the user mentions Animator, Mecanim, state machine, blend tree, or .controller.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Funity-animation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unity-animation\ndescription: >\n  Drive Unity 6.3 LTS character animation with Animator Controllers: states, transitions,\n  parameters, blend trees, animation layers, and humanoid Avatar IK. Use when wiring an\n  Animator, setting parameters from script (SetFloat\u002FSetBool\u002FSetTrigger), building blend\n  trees, or when the user mentions Animator, Mecanim, state machine, blend tree, or .controller.\n---\n\n# Unity Animation (Animator \u002F Mecanim)\n\nControl animation state with Unity 6.3 LTS's `Animator` and Animator Controllers: parameters,\ntransitions, blend trees, layers, and humanoid IK. Targets **Unity 6.3 LTS (6000.3)**.\n\n## When to use\n\n- Use when connecting animation clips into a state machine, driving them from script via\n  parameters, blending locomotion (idle→walk→run), layering an upper-body action over\n  movement, or adding foot\u002Fhand IK on a humanoid rig.\n- Use when the project has `*.controller` (Animator Controller) and `*.anim` assets, or a\n  rigged model with an Avatar.\n\n**When *not* to use:** simple non-skeletal value tweens (UI fades, position lerps) are better\ndone with a tween\u002Fcoroutine — see `unity-csharp-scripting`. Timeline cutscenes are a separate\ntool. 2D sprite frame animation also uses the Animator but with sprite keyframes.\n\n## Core workflow\n\n1. **Add an `Animator`** to the model and assign an Animator Controller; for a humanoid model,\n   set its rig to **Humanoid** so it has an Avatar (enables retargeting and IK).\n2. **Define parameters** on the controller — `Float` (Speed), `Bool` (IsGrounded), `Int`,\n   `Trigger` (Jump) — and states with transitions whose *conditions* read those parameters.\n3. **Set parameters from script**, never poke states directly: `SetFloat`, `SetBool`,\n   `SetInteger`, `SetTrigger`. The state machine resolves transitions for you.\n4. **Blend continuous motion with a Blend Tree** (one `Float` like Speed drives idle↔walk↔run)\n   instead of many discrete states + transitions.\n5. **Layer additive\u002Foverride motion** (e.g. an upper-body \"aim\" layer with an Avatar Mask) and\n   control its `layerWeight`.\n6. **Verify** in the Animator window during Play mode — the live state highlights and parameter\n   values update, so you can see exactly which transition fired (or didn't).\n\n## Patterns\n\n### 1. Drive locomotion + a one-shot action from script\n\n```csharp\nusing UnityEngine;\n\n[RequireComponent(typeof(Animator))]\npublic class CharacterAnim : MonoBehaviour\n{\n    private Animator _anim;\n    \u002F\u002F Cache parameter hashes — faster and typo-proof vs string lookups every frame.\n    private static readonly int Speed     = Animator.StringToHash(\"Speed\");\n    private static readonly int IsGrounded= Animator.StringToHash(\"IsGrounded\");\n    private static readonly int Jump      = Animator.StringToHash(\"Jump\");\n\n    private void Awake() => _anim = GetComponent\u003CAnimator>();\n\n    public void Tick(float planarSpeed, bool grounded)\n    {\n        _anim.SetFloat(Speed, planarSpeed);     \u002F\u002F drives a 1D blend tree (idle\u002Fwalk\u002Frun)\n        _anim.SetBool(IsGrounded, grounded);    \u002F\u002F gates a falling\u002Flanding transition\n    }\n\n    public void DoJump() => _anim.SetTrigger(Jump);  \u002F\u002F fire-and-forget; auto-resets after use\n}\n```\n\n### 2. Smooth a noisy input into a blend parameter\n\n```csharp\n\u002F\u002F dampTime smooths Speed so the blend tree doesn't snap; great for analog sticks.\n_anim.SetFloat(Speed, targetSpeed, 0.1f \u002F* dampTime *\u002F, Time.deltaTime);\n```\n\n### 3. Play \u002F cross-fade a state directly (bypassing parameter conditions)\n\n```csharp\n\u002F\u002F Useful for hit reactions where you want an immediate, explicit transition.\n_anim.CrossFade(\"Hit\", 0.1f);                    \u002F\u002F 0.1 = 10% of the state's length, not seconds\n_anim.CrossFadeInFixedTime(\"Hit\", 0.15f);        \u002F\u002F duration in seconds\n\u002F\u002F Or jump instantly:  _anim.Play(\"Hit\");\n```\n\n### 4. Wait until the current state finishes\n\n```csharp\nprivate System.Collections.IEnumerator AfterAttack()\n{\n    yield return null;                                 \u002F\u002F let the Animator start the transition\n    \u002F\u002F During a transition the \"current\" state is the one being left; read the next one.\n    var info = _anim.IsInTransition(0)\n        ? _anim.GetNextAnimatorStateInfo(0)\n        : _anim.GetCurrentAnimatorStateInfo(0);        \u002F\u002F layer 0\n    yield return new WaitForSeconds(info.length);      \u002F\u002F seconds; approximate, varies in blend trees\n    \u002F\u002F ...follow-up logic\n}\n```\n\n## Pitfalls\n\n- **`SetTrigger` missed or \"sticks\"** — triggers are consumed by the next satisfied transition\n  and auto-reset; if no transition consumes it, it can fire later unexpectedly. Use\n  `ResetTrigger` to clear, or prefer a `Bool` when the condition is a sustained state.\n- **String parameter typos fail silently** — a misspelled name just does nothing. Use\n  `Animator.StringToHash` and cache the int hashes.\n- **Transition feels laggy** — `Has Exit Time` makes the transition wait for the clip to reach\n  a normalized time. Uncheck it for responsive, condition-driven transitions (jump, hit).\n- **Character slides or won't move** — `Apply Root Motion` is on but your code also moves the\n  transform (or vice versa). Decide: root motion *or* scripted movement, not both.\n- **Upper-body layer overrides the whole body** — set the layer's Blend mode (Override vs\n  Additive), assign an Avatar Mask, and tune `layerWeight` (0–1).\n- **A cross-fade is much slower or faster than expected** — `CrossFade`'s duration is\n  *normalized* to the state's length. Use `CrossFadeInFixedTime` to give the\n  duration in seconds.\n- **IK does nothing** — IK only applies inside `OnAnimatorIK`, requires \"IK Pass\" enabled on\n  the layer, and needs a Humanoid Avatar.\n\n## References\n\n- For **blend trees** (1D vs 2D Freeform\u002FDirectional), **animation layers + Avatar Masks**,\n  and **humanoid IK** (`OnAnimatorIK`, `SetIKPositionWeight`, `SetIKPosition`, look-at), read\n  `references\u002Fblend-trees-and-ik.md`.\n- Primary docs: Unity Manual \"Animation\" section and `ScriptReference\u002FAnimator`.\n\n## Related skills\n\n- `unity-csharp-scripting` — the MonoBehaviour and coroutine timing used above.\n- `unity-physics` — moving the body that the animation visualises.\n- `game-ai` — deciding *when* to play which animation state.\n","# Unity Animation (Animator \u002F Mecanim)\n\nControl animation state with Unity 6.3 LTS's `Animator` and Animator Controllers: parameters,\ntransitions, blend trees, layers, and humanoid IK. Targets **Unity 6.3 LTS (6000.3)**.\n\n## When to use\n\n- Use when connecting animation clips into a state machine, driving them from script via\n  parameters, blending locomotion (idle→walk→run), layering an upper-body action over\n  movement, or adding foot\u002Fhand IK on a humanoid rig.\n- Use when the project has `*.controller` (Animator Controller) and `*.anim` assets, or a\n  rigged model with an Avatar.\n\n**When *not* to use:** simple non-skeletal value tweens (UI fades, position lerps) are better\ndone with a tween\u002Fcoroutine — see `unity-csharp-scripting`. Timeline cutscenes are a separate\ntool. 2D sprite frame animation also uses the Animator but with sprite keyframes.\n\n## Core workflow\n\n1. **Add an `Animator`** to the model and assign an Animator Controller; for a humanoid model,\n   set its rig to **Humanoid** so it has an Avatar (enables retargeting and IK).\n2. **Define parameters** on the controller — `Float` (Speed), `Bool` (IsGrounded), `Int`,\n   `Trigger` (Jump) — and states with transitions whose *conditions* read those parameters.\n3. **Set parameters from script**, never poke states directly: `SetFloat`, `SetBool`,\n   `SetInteger`, `SetTrigger`. The state machine resolves transitions for you.\n4. **Blend continuous motion with a Blend Tree** (one `Float` like Speed drives idle↔walk↔run)\n   instead of many discrete states + transitions.\n5. **Layer additive\u002Foverride motion** (e.g. an upper-body \"aim\" layer with an Avatar Mask) and\n   control its `layerWeight`.\n6. **Verify** in the Animator window during Play mode — the live state highlights and parameter\n   values update, so you can see exactly which transition fired (or didn't).\n\n## Patterns\n\n### 1. Drive locomotion + a one-shot action from script\n\n```csharp\nusing UnityEngine;\n\n[RequireComponent(typeof(Animator))]\npublic class CharacterAnim : MonoBehaviour\n{\n    private Animator _anim;\n    \u002F\u002F Cache parameter hashes — faster and typo-proof vs string lookups every frame.\n    private static readonly int Speed     = Animator.StringToHash(\"Speed\");\n    private static readonly int IsGrounded= Animator.StringToHash(\"IsGrounded\");\n    private static readonly int Jump      = Animator.StringToHash(\"Jump\");\n\n    private void Awake() => _anim = GetComponent\u003CAnimator>();\n\n    public void Tick(float planarSpeed, bool grounded)\n    {\n        _anim.SetFloat(Speed, planarSpeed);     \u002F\u002F drives a 1D blend tree (idle\u002Fwalk\u002Frun)\n        _anim.SetBool(IsGrounded, grounded);    \u002F\u002F gates a falling\u002Flanding transition\n    }\n\n    public void DoJump() => _anim.SetTrigger(Jump);  \u002F\u002F fire-and-forget; auto-resets after use\n}\n```\n\n### 2. Smooth a noisy input into a blend parameter\n\n```csharp\n\u002F\u002F dampTime smooths Speed so the blend tree doesn't snap; great for analog sticks.\n_anim.SetFloat(Speed, targetSpeed, 0.1f \u002F* dampTime *\u002F, Time.deltaTime);\n```\n\n### 3. Play \u002F cross-fade a state directly (bypassing parameter conditions)\n\n```csharp\n\u002F\u002F Useful for hit reactions where you want an immediate, explicit transition.\n_anim.CrossFade(\"Hit\", 0.1f);                    \u002F\u002F 0.1 = 10% of the state's length, not seconds\n_anim.CrossFadeInFixedTime(\"Hit\", 0.15f);        \u002F\u002F duration in seconds\n\u002F\u002F Or jump instantly:  _anim.Play(\"Hit\");\n```\n\n### 4. Wait until the current state finishes\n\n```csharp\nprivate System.Collections.IEnumerator AfterAttack()\n{\n    yield return null;                                 \u002F\u002F let the Animator start the transition\n    \u002F\u002F During a transition the \"current\" state is the one being left; read the next one.\n    var info = _anim.IsInTransition(0)\n        ? _anim.GetNextAnimatorStateInfo(0)\n        : _anim.GetCurrentAnimatorStateInfo(0);        \u002F\u002F layer 0\n    yield return new WaitForSeconds(info.length);      \u002F\u002F seconds; approximate, varies in blend trees\n    \u002F\u002F ...follow-up logic\n}\n```\n\n## Pitfalls\n\n- **`SetTrigger` missed or \"sticks\"** — triggers are consumed by the next satisfied transition\n  and auto-reset; if no transition consumes it, it can fire later unexpectedly. Use\n  `ResetTrigger` to clear, or prefer a `Bool` when the condition is a sustained state.\n- **String parameter typos fail silently** — a misspelled name just does nothing. Use\n  `Animator.StringToHash` and cache the int hashes.\n- **Transition feels laggy** — `Has Exit Time` makes the transition wait for the clip to reach\n  a normalized time. Uncheck it for responsive, condition-driven transitions (jump, hit).\n- **Character slides or won't move** — `Apply Root Motion` is on but your code also moves the\n  transform (or vice versa). Decide: root motion *or* scripted movement, not both.\n- **Upper-body layer overrides the whole body** — set the layer's Blend mode (Override vs\n  Additive), assign an Avatar Mask, and tune `layerWeight` (0–1).\n- **A cross-fade is much slower or faster than expected** — `CrossFade`'s duration is\n  *normalized* to the state's length. Use `CrossFadeInFixedTime` to give the\n  duration in seconds.\n- **IK does nothing** — IK only applies inside `OnAnimatorIK`, requires \"IK Pass\" enabled on\n  the layer, and needs a Humanoid Avatar.\n\n## References\n\n- For **blend trees** (1D vs 2D Freeform\u002FDirectional), **animation layers + Avatar Masks**,\n  and **humanoid IK** (`OnAnimatorIK`, `SetIKPositionWeight`, `SetIKPosition`, look-at), read\n  `references\u002Fblend-trees-and-ik.md`.\n- Primary docs: Unity Manual \"Animation\" section and `ScriptReference\u002FAnimator`.\n\n## Related skills\n\n- `unity-csharp-scripting` — the MonoBehaviour and coroutine timing used above.\n- `unity-physics` — moving the body that the animation visualises.\n- `game-ai` — deciding *when* to play which animation state.\n",{"name":5,"description":7},"main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Funity-animation","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill unity-animation",{"tool":37,"command":38},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill unity-animation",{"tool":40,"command":41},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill unity-animation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Funity-animation\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fblend-trees-and-ik.md","REFERENCE","参考文档",3448,"https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Funity-animation\u002Freferences\u002Fblend-trees-and-ik.md",[52,58,64,70,76,82],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]