scenario-unity-animation

Installation
SKILL.md

Unity animation (animator and technical animator)

Expert animation work in Unity is ordering and measurement: which layer, constraint, transition or camera wins is decided by list order, and whether feet, aim and blends are right is decided by numbers taken from the clips. An agent without the Animator, Timeline or Scene windows builds everything from data (AnimatorController, TimelineAsset, Cinemachine and Rigging components), steps it deterministically, measures it, and looks at contact sheets. Target: Unity 6000.3.21f1, Cinemachine 3.1.7, Animation Rigging 1.4.1, Timeline 1.8.12. If a sibling skill named here is missing from your available skills, ask the user to install it (npx skills add scenario-labs/skills --skill <name>); unattended, proceed from tool schemas and flag the gap.

REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Toolkit: scripts/ut_animation.py and C# jobs in scripts/AgentKit/Animation/ (namespace AgentKit.Animation), runtime code in scripts/Runtime/. Install with ut_animation.install(P).

Stance (the expert delta)

  1. Order is behavior, everywhere. Lower Animator layers win (iHeartGameDev, W0eRZGS6dhQ [00:05:04]); additive stops at the first Override [00:09:46]; transitions are uninterruptible by default, and with Ordered Interruption only transitions above the running one cut in, ties to list order (Catherine Proulx, Unity blog; measured: her None, ordered, unordered and same-frame cases reproduce). An interruption blends from a frozen snapshot pose (measured: 0 deg/s bone motion on the interruption frame): keep interrupting transitions short [added inference]. Rig constraints solve depth-first, spine before head or hand (Code Monkey, luBBz5oeR4Q [00:06:20]; measured head error 0.0 vs 17.9 deg).
  2. Blend-tree coordinates are gameplay units. Children at measured averageSpeed / averageAngularSpeed, not 0 / 0.5 / 1 (_J8RPIaO2Lc [00:16:30]); clamp the runtime parameter to the children's extents, or the edge pose holds while speed keeps rising [frame 00:13:38]. Script speed that disagrees with the clip slides the feet (Ketra Games, mNxEetKzc04 [00:00:32]; measured slide p50 0.19 vs 1.14 m/s).
  3. Idle is its own state when its pose differs from the walk (no exit time on IsMoving), the tree starting at a slow walk (mNxEetKzc04 [00:08:54]). Idle at the tree origin is fine only for in-place clips driven by script speed (_J8RPIaO2Lc [00:04:24]).
  4. Root motion is decided per clip and per axis (6.3 Manual): idle bakes rotation, Y and XZ; straight locomotion bakes rotation and Y; turns keep rotation; height-changing clips leave Y unbaked with Based Upon Feet, so blends do not float and a scripted jump does not add the clip's hip rise twice. Based Upon never causes drift: a baked axis has zero delta whatever it says; it only picks where the pose sits. Original keeps the file's facing and position (Ketra bakes Mixamo idles that way, no drift); Body Orientation re-centers mocap segments (measured over 30 s: both 0 m drift, Original faced 88 deg away and stood 2.43 m off; XZ unbaked drifted 0.246 m). One CharacterController.Move(deltaPosition + y) in OnAnimatorMove, never deltaPosition * Time.deltaTime [00:07:21]. Animator.gravityWeight is 1 on Y-baked clips, 0 on Y-unbaked ones, blended across transitions (Manual; measured, and 0 everywhere with root motion off).
  5. Automate import from one reference, scoped to a folder (git-amend, V9_Z6hUOG_8): rig in OnPreprocessModel, clips in OnPreprocessAnimation, GetVersion() bumped on rule changes, never a reimport inside the callbacks. Roles come from file names or rules, never take names: every Mixamo take is "mixamo.com". Reference FBX sub-asset clips; a clip duplicated before the Humanoid switch keeps bone paths (BEZHVYk6Fa4 [00:12:03]; measured: it moved the humanoid 0.0 deg, the post-switch copy 40.1 deg). Copy From Other on a different hierarchy imports zero clips, reported only in the import log (observed). Translation DoF is off by default [00:02:21].
  6. Masks make layers; reference poses make additive layers. An Override layer without a mask replaces the whole body; an additive clip only works over its authored base pose (W0eRZGS6dhQ [00:05:33], [00:09:57]). Masks at import drop fingers and IK goals a clip does not need (Manual, cost).
  7. Cameras: one Brain, move targets, pick the rig by game type (Unity CM3.1 series). Smart Update plus Late Update blends first on jitter (Brain doc). Third Person Follow for over-the-shoulder; FreeLook plus Camera Offset plus Deoccluder fight (u0a1F6BlczE [00:02:41]). A procedural Position Control overrides animation; never parent one to a mover (XTVzs4B1d7I [00:03:10]). Cameras on opposite sides blend through the target: CylindricalPosition hint (measured: none 0.5 m and up dot 0.0, Cylindrical 5.02 m and 0.995, IgnoreTarget alone still 0.5 m) [00:13:32]. Deoccluder: Ignore Tag the player, glass on Transparent Layers; triggers never count (measured). Timeline overrides the Brain: priority is ignored until it stops (measured in Play mode).
  8. Timeline: tracks for continuous actions, markers for instants, Signals when there is no payload (Ciro Continisio, gsEe0_o_934 [00:18:53]). A receiver gets every notification routed to it: type-check [frame 00:22:57]. Mixers run while scrubbing; spawn in OnGraphStart, destroy after [00:45:30].

Establish first

Installs
159
GitHub Stars
1.0K
First Seen
Sep 26, 2026