Gridwright Start for $1

Unity Slice Sprite Sheet: Sprite Editor Steps and Fixes

Slice a sprite sheet in Unity 2022 and 6: pixel art import settings, Grid By Cell Size, Offset, Padding and Pivot, plus fixes for cut frames, blur and jitter.

Sprite Sheet Cutter at work
Sprite Sheet Cutter at work: Single frames from a sprite sheet.

You drag a sprite sheet into Unity and it arrives as one big picture. You open the Sprite Editor, press Slice, and get a mess: frames cut through the middle of the character, a sword that became its own sprite, a shadow with its own name. When the animation finally plays, the character is blurry and hops up and down, although every frame on the sheet looked fine.

Each of these comes from one import or slice setting. This guide goes through them in the order Unity asks for them, in Unity 2022 and Unity 6, fixes the four problems people hit most, and shows how the Sprite Sheet Cutter finds the right cut in seconds.

Step 1: Import the sheet as a sprite

  1. Drag the PNG into the Project window.
  2. Select it. In the Inspector, set Texture Type to Sprite (2D and UI). Projects made from a 2D template do this by themselves.
  3. Set Sprite Mode to Multiple, the mode for a file with several images in it.
  4. Set Pixels Per Unit. It starts at 100, so 100 pixels make one Unity unit. For pixel art, use your tile size, such as 16 or 32, and the same value on every sprite in the game. The pixel art size guide helps you pick one.

Pixel art needs three more settings:

Farm RPG
Farm RPG: 16x16 farming RPG kit: a working farmer in 4 directions, a character creator, seasons, animals. One of the 150 packs in Gridwright.
  • Filter Mode: Point (no filter). The default, Bilinear, blends neighbouring pixels, which Unity itself describes as "blurry up close".
  • Compression: None, on the Default tab at the bottom. The compressed formats shift colours on hard pixel edges.
  • Max Size: at least the longest side of your sheet. It starts at 2048, and a larger sheet is scaled down to fit, which softens every frame.

Press Apply at the bottom of the Inspector.

Step 2: Open the Sprite Editor

Press Sprite Editor in the Inspector. If the window doesn't open and Unity says no Sprite Editor window is registered, the 2D Sprite package is missing: open Window > Package Manager, choose Unity Registry, find 2D Sprite and press Install.

Low-Poly Kit Fantasy Village
Low-Poly Kit Fantasy Village: 116 low poly 3D models for a fantasy village: houses, trees, props. One of the 150 packs in Gridwright.

Step 3: Pick a slice type

Open the Slice menu at the top left of the Sprite Editor. Type has four choices:

  • Automatic finds each image by the transparent pixels around it, for frames that don't sit on a grid.
  • Grid By Cell Size cuts frames of the Pixel Size you type.
  • Grid By Cell Count takes Column & Row and works out the size.
  • Isometric Grid cuts diamond-shaped tiles for isometric maps.

For a character's animation, use one of the two grids. Equal cells keep the character on the same spot in every frame, which is what stops jitter later.

Step 4: Set the grid

  • Pixel Size: one frame's width and height.
  • Offset: the empty border before the first frame.
  • Padding: the gap between frames.
  • Keep Empty Rects: leave it off, and fully transparent cells are dropped, so a short last row adds no blank frames.
  • Pivot: the point Unity places at the GameObject's position. Center is the default. For a character standing on the ground, pick Bottom so the feet sit on the position.
  • Method: Delete Existing deletes the old sprites and adds the new ones. Smart keeps an old sprite where a new one overlaps it and gives it the new position and size. Safe keeps every old sprite and ignores new ones that overlap them. Use Smart when you re-slice a sheet whose sprites are already in clips.

To read the numbers, open the sheet in an image editor that shows the cursor position. The first frame's top-left pixel gives the Offset, and the second frame's top-left pixel gives the Pixel Size plus the Padding. A row of 8 frames of 32 px, with a 1 px border and 2 px gaps, is 1 + 8 x 32 + 7 x 2 + 1 = 272 px wide: Offset 1, Pixel Size 32, Padding 2.

Press Slice, check every box on the sheet, drag a box's edges if one is off, then press Apply in the Sprite Editor's toolbar.

Step 5: Find the sprites and animate them

Close the Sprite Editor. The sheet in the Project window now has an arrow; open it and the sprites are underneath, named knight_0, knight_1 and on.

Click the first frame of a row, Shift-click the last, and drag them into the Scene view. Unity asks where to save a new animation clip, then makes a GameObject with a Sprite Renderer and an Animator. Press Play and it runs. To change the speed, open Window > Animation > Animation and set the clip's Sample Rate; in Unity 2022 and 6 you first tick Show Sample Rate in that window's menu.

When slicing goes wrong

Frames cut through the character

The first frame looks right and each column is a little further off, or every frame carries a strip of its neighbour. The sheet has a border or gaps the grid doesn't know about. Set Offset and Padding and slice again. If the cells aren't all one size, no grid fits: use Automatic and fix the pivots, or rebuild the sheet as shown below.

Automatic slicing splits off a sword or a shadow

Automatic makes one sprite for each group of touching pixels, so a sword held one pixel from the hand or a shadow under the feet becomes its own sprite. If the sheet has a grid, use Grid By Cell Size instead. If it has none, click the stray piece, press Delete, and drag the main frame's box until it holds both parts.

Sprites are blurry

Check the three settings from Step 1: Point (no filter), Compression None, and a Max Size that fits the sheet, then Apply. If sprites are sharp when still and shimmer while the camera moves, add the Pixel Perfect Camera component.

The character jitters or hops

Each frame has its pivot on a different spot. Automatic fits each box tightly round its frame, so a Center pivot moves whenever the pose gets wider or taller. Slice on a grid so every frame has the same box, and set Pivot to Bottom once for all of them. To keep Automatic's boxes, give each sprite a Custom pivot with Pivot Unit Mode on Pixels, on the same point of the body in every frame. If grid-sliced frames still jitter, the art itself moves inside its cells.

The fast way: find the cut, keep the frames

Unity's Sprite Editor shows the boxes, but it doesn't play a row, and the frames stay inside the texture. The Sprite Sheet Cutter does both, in your browser:

Sprite Sheet Maker: One sprite sheet from many frames
Sprite Sheet Maker: One sprite sheet from many frames. Included in Gridwright.
  1. Drop the sprite sheet on the box, or try our sample.
  2. Check the yellow cut lines. Set the cell size, offset and spacing, or the rows and columns.
  3. Pick a row and watch its animation, so a bad cut shows before you touch Unity.
  4. Download every frame as a PNG, with a JSON map and a Godot SpriteFrames file.

The numbers that put the yellow lines between the frames go straight into Unity: cell size into Pixel Size, offset into Offset, spacing into Padding. The single PNGs help when you have many frames to retouch or a sheet to rebuild. The image stays on your computer, so it is safe for art from a game you haven't announced.

You can try it here, with no account. In the demo's own words: "Free demo on our example. Saving your files comes with the full tool."

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

If your animation is a folder of loose PNGs, the Sprite Sheet Maker orders them by name (walk_2 before walk_10) and lays them out in a grid with the frames per row you choose, smaller frames standing on the bottom of their cell. Padding and a margin are one click each. That sheet slices in Unity with Grid By Cell Size, its padding and margin as Padding and Offset, and a Bottom pivot.

FAQ

How do I slice a sprite sheet in Unity?

Set Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple, press Apply, open the Sprite Editor, choose Slice > Grid By Cell Size, type the frame size, Offset and Padding, press Slice, then Apply.

Why are my sliced sprites blurry?

Filter Mode is on Bilinear, Compression is on, or Max Size is smaller than the sheet. Set Point (no filter), None and a Max Size that fits, then Apply.

Slice your next sheet

Open the Sprite Sheet Cutter demo, line the yellow cuts up between the frames, and type the same numbers into Unity's Slice menu. The full tool is one of Gridwright's 44 tools, and the 150 asset packs that come with it include characters already drawn as sheets on one grid.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes