This skill helps an agent control animation state in Unity with Animator Controllers. It starts by reading the controller’s YAML so script strings match parameter and state names exactly, then drives locomotion through cached parameter hashes and lets transitions resolve.
It includes patterns for damped parameters, waiting for a triggered state, and building a controller from editor code, plus a reference on blend trees, layers with Avatar Masks and humanoid IK. A gotchas list covers triggers that fire late, laggy exit times, sliding root motion and IK that does nothing.
What You Get
- A seven-step workflow from reading the controller YAML to verifying the result
- Three C# patterns: parameters with cached hashes, waiting for a triggered state and building a controller from editor code
- A reference on 1D and 2D blend trees, layer weights, Avatar Masks and humanoid and foot IK
- A gotchas list for sticky triggers, laggy transitions, root motion conflicts and CrossFade timing
Common Use Cases
- Finding why SetTrigger does nothing because a parameter name does not match the controller
- Fixing a transition that lags because Has Exit Time is on
- Layering an aim animation over the arms while the legs keep walking
- Planting feet on slopes or aiming a hand at a target with IK
What Makes It Unique
The skill treats the .controller file as readable text, so the agent compares parameter and state names with script strings before running anything. It also gives an editor-code route to create controllers when the Animator window is out of reach, and ties a version note to the exact Unity API source it was checked against.
Under The Hood
The agent loads the SKILL.md and, for blend trees and IK, one reference file. It reads .controller YAML and model .meta files, greps scripts for parameter strings, and edits C# files. When the Unity command line tool and a ready Editor are available it can run commands to read a controller and evaluate code in Play mode, and the skill shows an editor script run in batch mode. The Unity command pipeline it names is a pre-release package. Without the Editor it asks you to watch the Animator window in Play mode. Nothing is fetched from the web during normal use.