How to import a sprite sheet into Unity.
A complete, accurate Unity walkthrough: import a 4×4 walk-cycle sheet without blurring it, slice it in the Sprite Editor, turn each row into an animation clip, and drive the clips from player input.
What you need before you start
This tutorial assumes a Unity 2D project and a 4×4 walk-cycle sprite sheet — 16 frames in four rows: down, left, right, up, four frames each. That is exactly the layout PixelForge produces (at both 96px and 48px per frame), but any evenly-gridded sheet works the same way. The whole job is four moves: import without blurring, slice the grid, make four clips, play them from input.
rb.velocity up to Unity 2022 and rb.linearVelocity from Unity 6. The Sprite Editor needs the 2D Sprite package, which every 2D template already includes.Import the sheet with crisp pixels
Drag sprite-sheet-96-transparent.png into your Assets folder, select it, and fix the Inspector before anything else — Unity's defaults (bilinear filtering + compression) will smear pixel art into mush:
Click Apply. If your game window still looks soft later, check the camera: pixel-perfect rendering wants an orthographic camera, and the 2D Pixel Perfect package can lock it in project-wide.
Slice the 4×4 grid in the Sprite Editor
Open the Sprite Editor
With the PNG selected, click Sprite Editor in the Inspector.
Slice → Grid By Cell Size
Top-left Slice menu → Type: Grid By Cell Size → 96×96 (or 48×48).
Slice, then Apply
Click Slice, check the 16 outlines, then Apply in the top bar.
Unity names the pieces sheet_0 through sheet_15, left-to-right, top-to-bottom. On a PixelForge sheet that means:
Turn each row into an animation clip
Unity has a drag shortcut that does three setup steps at once: expand the sheet asset (the little triangle), select frames 0–3, and drag them into the Hierarchy. Unity asks where to save the clip — call it walk_down.anim — and creates a GameObject with a SpriteRenderer, an Animator, and a controller already wired to play it.
For the other three directions, keep that same GameObject selected and open Window → Animation → Animation. In the clip dropdown pick Create New Clip… (walk_left, walk_right, walk_up), then select the matching four frames in the Project window and drag them into the timeline. Set Samples to 8–10 for a natural walk pace — if you don't see the Samples field, enable Show Sample Rate from the timeline's gear menu.
Drive the walk from player input
The simplest top-down setup that actually feels right:
- Add a Rigidbody2D — set Gravity Scale to 0 and freeze Z rotation.
- Add a Collider2D (capsule reads best for characters).
- In a small script, read
Input.GetAxisRawfor both axes each frame, move withrb.linearVelocity = direction * speed(orrb.velocitybefore Unity 6), and pick the clip by the dominant axis:anim.Play("walk_right")when x wins and is positive,walk_leftwhen negative,walk_up/walk_downwhen y wins. - When input is zero, either
anim.speed = 0to hold the pose or add an idle state — the neutral first frame of each row works as a built-in idle.
No sprite flipping tricks needed: the sheet has a dedicated left row, so glasses, hair parts, and asymmetric outfits stay on the correct side — one of the quiet advantages of a 4-row sheet over the flip-the-right-row shortcut.
No sheet yet? Forge one.
Everything above works with any 4×4 sheet — and if what you're missing is the character itself, that's the part PixelForge does: upload one photo and get this exact layout back, feet aligned, background removed, at both 96px and 48px. See Unity character sprites from a photo for how the pack is engineered for the Sprite Editor, or start from the main photo-to-sprite page.
Frequently asked questions
Two defaults: Filter Mode (bilinear) and Compression. Set Filter Mode to Point (no filter) and Compression to None on the texture, click Apply, and the pixels come back sharp.
Set Sprite Mode to Multiple, open the Sprite Editor, choose Slice → Grid By Cell Size, enter your frame size (96×96 for PixelForge's large sheet), click Slice, then Apply.
Either works on an even sheet — Cell Size at 96×96 is the safer habit because it stays correct even if a sheet ships with extra rows appended later.
8–10 samples per second reads naturally for a 4-frame cycle. Below 6 looks like slideshow; above 12 looks like scurrying.
You can swap SpriteRenderer.sprite from an array on a timer and skip the Animator entirely — fine for jams. The Animator earns its keep once you add idle/attack states or blend trees.
Put anyone into your game.
$5 · one photo · 4-direction walk pack · no subscription
Make a sprite — $5