> parameters, blend trees, animation layers, and humanoid Avatar IK. Use when wiring an Animator, setting parameters from script (SetFloat/SetBool/SetTrigger), building blend trees, or when the user mentions Animator, Mecanim, state machine, blend tree, or .controller.
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill unity-animation
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).
parameters, blending locomotion (idle→walk→run), layering an upper-body action over
movement, or adding foot/hand IK on a humanoid rig.
*.controller (Animator Controller) and *.anim assets, or arigged 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.
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).
Float (Speed), Bool (IsGrounded), Int,Trigger (Jump) — and states with transitions whose *conditions* read those parameters.
SetFloat, SetBool,SetInteger, SetTrigger. The state machine resolves transitions for you.
Float like Speed drives idle↔walk↔run)instead of many discrete states + transitions.
control its layerWeight.
values update, so you can see exactly which transition fired (or didn't).
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<Animator>();
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
}
// dampTime smooths Speed so the blend tree doesn't snap; great for analog sticks.
_anim.SetFloat(Speed, targetSpeed, 0.1f /* dampTime */, Time.deltaTime);
// 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");
private System.Collections.IEnumerator AfterAttack()
{
var info = _anim.GetCurrentAnimatorStateInfo(0); // layer 0
yield return new WaitForSeconds(info.length); // approximate clip length
// ...follow-up logic
}
SetTrigger missed or "sticks" — triggers are consumed by the next satisfied transitionand 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.
Animator.StringToHash and cache the int hashes.
Has Exit Time makes the transition wait for the clip to reacha normalized time. Uncheck it for responsive, condition-driven transitions (jump, hit).
Apply Root Motion is on but your code also moves thetransform (or vice versa). Decide: root motion *or* scripted movement, not both.
Additive), assign an Avatar Mask, and tune layerWeight (0–1).
OnAnimatorIK, requires "IK Pass" enabled onthe layer, and needs a Humanoid Avatar.
and humanoid IK (OnAnimatorIK, SetIKPositionWeight, SetIKPosition, look-at), read
references/blend-trees-and-ik.md.
ScriptReference/Animator.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.Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.
Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.
This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.
Take gamedev-skills/unity-animation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.