# 1. Packages and Mental Model Part of [[2D Animation and Sprite Tools]]. Next: [[2. Skinning Editor and Sprite Skin]]. ## 1.1 Install - **New 2D work:** Unity Hub > **Universal 2D** template. The 6000.5 "Set up a project for 2D games" page lists **2D Animation** and **2D PSD Importer** among the default template packages, along with Sprite, SpriteShape, Tilemap Editor, Tilemap Extras, and Aseprite Importer. - **Existing project:** Package Manager > Unity Registry > **2D Animation** (`com.unity.2d.animation`) and **2D PSD Importer** (`com.unity.2d.psdimporter`). For Editor 6000.5 the official package pages list **15.1.0** and **14.0.3** as released. Confirm the resolve in the details pane. You also need a `SpriteRenderer` and, for clips, an **Animator** with an Animator Controller - the same Mecanim graph language as [[Animation]]. ## 1.2 Three jobs, three components | Job | What it is | Main types | |---|---|---| | **Skeletal deform** | A sprite mesh bends with bones | Skinning Editor (asset), `SpriteSkin` (runtime, `UnityEngine.U2D.Animation`) | | **Sprite Swap** | Replace a sprite by category/label (faces, weapons, outfits) | `SpriteLibraryAsset`, `SpriteLibrary`, `SpriteResolver` | | **Playback** | Play walk / idle / attack clips, fire events | Animator, clips, parameters ([[Animation]], [[6.Animation Events Reliable Patterns]]) | A typical character: a root with an Animator and a `SpriteLibrary`; children with `SpriteRenderer` + `SpriteSkin` (body parts) and, where you swap, a `SpriteResolver`. Swap does not replace skinning; a resolver changes *which* sprite the renderer shows, and SpriteSkin deforms *that* sprite if it is rigged. Do not use Sprite Swap as a flipbook for a 20-frame walk unless you mean it. Flipbooks are Animation window clips on a `SpriteRenderer.sprite` curve, or an `AnimatedTile` on a tilemap. Sprite Library is for *named* alternatives (Idle-Face / Blink, Sword / Axe). ## 1.3 Where this is not 3D Animation Rigging [[Animation]] / Animation Rigging is transforms and IK on a 3D rig. 2D Animation's bones live in the Skinning Editor on the *sprite asset*, and `SpriteSkin` applies them to a mesh generated from that sprite. You can still add IK-like constraints in 2D Animation's rig tools (confirm the 15.1 Skinning Editor IK gizmos in your package manual) - do not drop a `TwoBoneIKConstraint` from the 3D package onto a SpriteSkin and expect it to work. ## 1.4 Exercise In a Universal 2D project, confirm both packages in Package Manager at 15.1.x and 14.0.x. Create a single sliced sprite, add a `SpriteRenderer`, and play a one-clip Animator that swaps two frames on the sprite property - that is Mecanim without 2D Animation. The next part adds bones. ## Sources - 2D Animation 15.1.0 for 6000.5: https://docs.unity.com/en-us/engine/6000.5/manual/packages-list/packages-all/pack-safe/com-unity-2d-animation - 2D PSD Importer 14.0.3 for 6000.5: https://docs.unity.com/en-us/engine/6000.5/manual/packages-list/packages-all/pack-safe/com-unity-2d-psdimporter - Universal 2D template: https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-game-development/setup-project-2d-game