# 1. Clips, Avatar, and Animator
Part of [[Animation]]. Next: [[2.States Transitions and Parameters]].
**Target:** Unity 6000.5+. Docs: Unity Manual 6000.5 — Animation Clips, Humanoid Avatar / Avatar Mapping, Introduction to Animator Controllers.
## 1.1 The three pieces
| Asset / component | Role |
|---|---|
| **Animation Clip** | Curves over time (bones, blend shapes, custom float curves, events). Imported from FBX or authored in the Animation window. |
| **Avatar** | Maps the imported skeleton to Unity's muscle/retargeting model (**Humanoid**) or marks a single skeleton (**Generic**). |
| **Animator** + **Animator Controller** | Runtime player + the state machine / blend tree graph that chooses which clips play. |
You almost always need all three. A lone clip on a GameObject via the legacy Animation component is a different (older) path — this tutorial is Mecanim only.
## 1.2 Import an Animation Clip
1. Drop an FBX into `Assets/_Project/Animation/Clips/` (or a character pack).
2. Select the FBX → **Inspector → Rig** tab:
- **Animation Type:** *Humanoid* for bipeds you want to retarget / use muscle space / use built-in IK goals. *Generic* for creatures, props, or a fixed skeleton you will never retarget.
- **Avatar Definition:** *Create From This Model* on the first FBX that defines the bind pose; *Copy From Other Avatar* on every other mesh/clip set that shares that skeleton.
3. Click **Apply**, then open **Configure…** for Humanoid. Check that bones map (green), T-pose is sane, and muscle limits look right. Fix bad mappings before you build controllers — retargeting bugs are expensive later (see [[7.Animation Pitfalls]]).
4. **Animation** tab: select each clip sub-asset. Set:
- **Loop Time** for cycles (walk/run/idle).
- **Root Transform Rotation / Position (Y) / Position (XZ)** — Bake Into Pose vs root motion (deep dive in part 4).
- **Loop Pose** when the first/last pose should match for seamless cycles.
Clips also appear as expandable children of the FBX in the Project window. You can rename clip take names in the Animation tab before Apply.
## 1.3 Humanoid vs Generic (decision)
| | Humanoid | Generic |
|---|---|---|
| Retarget clips across characters | Yes (same Avatar muscle space) | No (curves are bone paths) |
| Built-in `OnAnimatorIK` look-at / hand-foot goals | Yes | No |
| Animation Rigging package | Works on both (constraint transforms are yours) | Works |
| Odd topology (extra spines, non-biped) | Painful / impossible | Preferred |
Rule of thumb: player and humanoid NPCs → Humanoid. Vehicles, turrets, modular props → Generic (or no Avatar, just Animator + clip).
## 1.4 Animator component
Add **Animator** to the character root (same object that owns the skinned mesh hierarchy root, typically).
Key fields:
- **Controller** — the Animator Controller asset (next section).
- **Avatar** — usually filled from the imported model; must match Humanoid/Generic expectation of the clips.
- **Apply Root Motion** — if on, root curves move the Transform (or you intercept via `OnAnimatorMove`). Part 4.
- **Update Mode** — *Normal* (scaled time), *Animate Physics* (FixedUpdate; use with rigidbodies), *Unscaled Time* (UI/pause menus).
- **Culling Mode** — *Always Animate* vs *Cull Update Transforms* / *Cull Completely* for off-screen cost ([[Meta Quest 2]] cares).
```csharp
using UnityEngine;
/// Minimal handle: cache Animator, fail fast if miswired.
[RequireComponent(typeof(Animator))]
public sealed class AnimRef : MonoBehaviour
{
public Animator Animator { get; private set; }
void Awake()
{
Animator = GetComponent<Animator>();
if (Animator.runtimeAnimatorController == null)
Debug.LogError(
quot;{name}: Animator has no Controller.", this);
if (Animator.avatar == null)
Debug.LogWarning(quot;{name}: Animator has no Avatar (ok for some Generic setups).", this);
}
}
```
## 1.5 Create an Animator Controller
1. Project → right-click → **Create → Animator Controller** → `AC_PlayerLocomotion.controller`.
2. Assign it to the character's Animator **Controller** slot.
3. Double-click the asset to open the **Animator** window. You get a **Base Layer** with an empty graph, plus **Parameters** and **Layers** tabs.
Unity also auto-creates a controller when you drag a clip onto a GameObject that has no Animator Controller yet — fine for prototypes; rename and relocate into your Animation folder immediately.
## 1.6 Empty state vs default clip
- Orange state = **default** state entered on enable.
- Create a state: right-click graph → **Create State → Empty**, or drag a clip onto the graph (creates a state named after the clip and assigns the motion).
- Select a state → Inspector: **Motion** (clip or blend tree), **Speed**, **Mirror** (Humanoid), **Write Defaults** (dangerous — part 7), **Foot IK** (Humanoid foot IK pass for that state).
For an idle-only placeholder: drag `Idle` onto the graph, leave it orange. Next parts add parameters and transitions.
## 1.7 Where Timeline fits
[[Timeline Basics]] Animation tracks drive the same Animator (or an Override track with an Avatar Mask). Cutscenes often use a second Animator Controller or Timeline overrides while gameplay uses `AC_PlayerLocomotion`. Do not fight yourself with two systems writing the same bones without a clear ownership rule (gameplay vs cutscene layer).
## 1.8 Verified vs unverified
**Verified:** Animator Controller creation and role (Manual — Introduction to Animator Controllers); Humanoid vs Generic split as documented; Animator component fields described above are standard Inspector fields.
**Unverified:** exact bone-mapping failure modes for your specific FBX tool-chain; whether a given marketplace pack's Avatar Configure pass is clean.
**Not compiled:** `AnimRef` above.