AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Unity Animation

skill-gamedev-skills-awesome-gamedev-agent-skills-unity-animation · by gamedev-skills

>

No reviews yet
0 installs
44 views
0.0% view→install

Install

$ agentstack add skill-gamedev-skills-awesome-gamedev-agent-skills-unity-animation

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-gamedev-skills-awesome-gamedev-agent-skills-unity-animation)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Unity Animation? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Unity Animation (Animator / Mecanim)

Control animation state with Unity 6's Animator and Animator Controllers: parameters, transitions, blend trees, layers, and humanoid IK. Targets Unity 6 (6000.0 LTS).

When to use

  • Use when connecting animation clips into a state machine, driving them from script via

parameters, blending locomotion (idle→walk→run), layering an upper-body action over movement, or adding foot/hand IK on a humanoid rig.

  • Use when the project has *.controller (Animator Controller) and *.anim assets, or a

rigged model with an Avatar.

**When not to use:** simple non-skeletal value tweens (UI fades, position lerps) are better done with a tween/coroutine — see unity-csharp-scripting. Timeline cutscenes are a separate tool. 2D sprite frame animation also uses the Animator but with sprite keyframes.

Core workflow

  1. Add an Animator to the model and assign an Animator Controller; for a humanoid model,

set its rig to Humanoid so it has an Avatar (enables retargeting and IK).

  1. Define parameters on the controller — Float (Speed), Bool (IsGrounded), Int,

Trigger (Jump) — and states with transitions whose conditions read those parameters.

  1. Set parameters from script, never poke states directly: SetFloat, SetBool,

SetInteger, SetTrigger. The state machine resolves transitions for you.

  1. Blend continuous motion with a Blend Tree (one Float like Speed drives idle↔walk↔run)

instead of many discrete states + transitions.

  1. Layer additive/override motion (e.g. an upper-body "aim" layer with an Avatar Mask) and

control its layerWeight.

  1. Verify in the Animator window during Play mode — the live state highlights and parameter

values update, so you can see exactly which transition fired (or didn't).

Patterns

1. Drive locomotion + a one-shot action from script

using UnityEngine;

[RequireComponent(typeof(Animator))]
public class CharacterAnim : MonoBehaviour
{
    private Animator _anim;
    // Cache parameter hashes — faster and typo-proof vs string lookups every frame.
    private static readonly int Speed     = Animator.StringToHash("Speed");
    private static readonly int IsGrounded= Animator.StringToHash("IsGrounded");
    private static readonly int Jump      = Animator.StringToHash("Jump");

    private void Awake() => _anim = GetComponent();

    public void Tick(float planarSpeed, bool grounded)
    {
        _anim.SetFloat(Speed, planarSpeed);     // drives a 1D blend tree (idle/walk/run)
        _anim.SetBool(IsGrounded, grounded);    // gates a falling/landing transition
    }

    public void DoJump() => _anim.SetTrigger(Jump);  // fire-and-forget; auto-resets after use
}

2. Smooth a noisy input into a blend parameter

// dampTime smooths Speed so the blend tree doesn't snap; great for analog sticks.
_anim.SetFloat(Speed, targetSpeed, 0.1f /* dampTime */, Time.deltaTime);

3. Play / cross-fade a state directly (bypassing parameter conditions)

// Useful for hit reactions where you want an immediate, explicit transition.
_anim.CrossFade("Hit", 0.1f);                    // blend over 0.1s normalized
// Or jump instantly:  _anim.Play("Hit");

4. Wait until the current state finishes

private System.Collections.IEnumerator AfterAttack()
{
    var info = _anim.GetCurrentAnimatorStateInfo(0);   // layer 0
    yield return new WaitForSeconds(info.length);      // approximate clip length
    // ...follow-up logic
}

Pitfalls

  • SetTrigger missed or "sticks" — triggers are consumed by the next satisfied transition

and auto-reset; if no transition consumes it, it can fire later unexpectedly. Use ResetTrigger to clear, or prefer a Bool when the condition is a sustained state.

  • String parameter typos fail silently — a misspelled name just does nothing. Use

Animator.StringToHash and cache the int hashes.

  • Transition feels laggyHas Exit Time makes the transition wait for the clip to reach

a normalized time. Uncheck it for responsive, condition-driven transitions (jump, hit).

  • Character slides or won't moveApply Root Motion is on but your code also moves the

transform (or vice versa). Decide: root motion or scripted movement, not both.

  • Upper-body layer overrides the whole body — set the layer's Blend mode (Override vs

Additive), assign an Avatar Mask, and tune layerWeight (0–1).

  • IK does nothing — IK only applies inside OnAnimatorIK, requires "IK Pass" enabled on

the layer, and needs a Humanoid Avatar.

References

  • For blend trees (1D vs 2D Freeform/Directional), animation layers + Avatar Masks,

and humanoid IK (OnAnimatorIK, SetIKPositionWeight, SetIKPosition, look-at), read references/blend-trees-and-ik.md.

  • Primary docs: Unity Manual "Animation" section and ScriptReference/Animator.

Related skills

  • unity-csharp-scripting — the MonoBehaviour and coroutine timing used above.
  • unity-physics — moving the body that the animation visualises.
  • game-ai — deciding when to play which animation state.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.