Sprite sheet to Unity animation
How to import a sprite sheet into Unity 6
A reliable Unity import starts before you open the Sprite Editor. Build a regular sheet with known cell dimensions, configure the texture as a multiple-sprite asset, slice it with the exact grid values, and inspect the generated sub-assets before creating an animation clip.
What you will accomplish
You will export a zero-gap PNG grid, configure Unity's Sprite texture importer, slice the sheet by cell size, verify pivots and frame order, and create a looping Animation Clip.
Prepare a Unity sprite sheetBefore you start
- Unity 6 with a 2D project or the 2D Sprite package available.
- Animation frames with consistent width, height, and pivot alignment.
- The exact frame width, frame height, column count, row count, and intended playback speed.
Step-by-step workflow
- 1
Build a predictable PNG grid
Pack the source frames with the Unity preset: regular grid, 0 px spacing, 0 px outer padding, transparent background, and 1× scale.
- Write down the cell width and height shown by the generator. Unity's Grid by Cell Size slice uses these exact pixel values.
- Confirm that frames read left to right and then top to bottom in the intended animation order.
- Export PNG. Generic or Phaser JSON is not required for Unity's regular Sprite Editor slicing workflow.
- 2
Add the PNG to the Unity project
Copy or drag the exported PNG into the project's Assets folder and select the texture in the Project window.
- Keep source sprites in a clear folder such as Assets/Art/Characters/Player.
- Use an asset name that includes the animation and cell size when the project contains many sheets.
- Wait for Unity to finish importing before changing texture settings.
- 3
Configure the Sprite texture importer
Set Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple, then choose project-appropriate Pixels Per Unit and click Apply.
- Pixels Per Unit controls how many source pixels equal one world unit; use one consistent value across related character assets.
- For crisp pixel art, set Filter Mode to Point (no filter), usually disable mipmaps for a fixed-scale 2D workflow, and avoid lossy platform compression.
- For smooth painted sprites, Bilinear filtering may be more appropriate. The correct choice depends on the art style, not the sheet format.
- 4
Open Sprite Editor and slice the grid
Open Sprite Editor, choose Slice, select Grid by Cell Size, and enter the exported frame width and height.
- Leave Offset at 0,0 and Padding at 0,0 for a zero-gap sheet.
- Choose a pivot that matches the source alignment. Bottom Center is often useful for grounded characters; Center works for effects and many UI animations.
- Apply the slice and close Sprite Editor so Unity creates the individual sprite sub-assets.
- 5
Inspect the generated sprites
Expand the texture asset in the Project window and verify the number, bounds, naming order, and pivot of every sub-sprite.
- Open a few frames in sequence and confirm that no neighboring pixels leak into the rectangle.
- If the frame count is wrong, return to Sprite Editor and correct cell size, offset, or padding instead of manually resizing every rectangle.
- Check the first and last sprites carefully because grid mistakes often leave a partial cell at an outer edge.
- 6
Create and test the Animation Clip
Select the sliced sprites in order, drag them into the Scene or Animation window, and save the generated Animation Clip and Animator Controller.
- Set the clip's Samples value to the intended frames per second and enable Loop Time for a repeating idle, walk, or effect animation.
- Run the scene at the target camera scale and check for blur, jitter, incorrect pivot, and a visible pause at the loop boundary.
- If the motion jitters, fix source canvas alignment or pivots rather than compensating with per-frame GameObject movement.
Recommended settings
| Setting | Recommended value | Why it matters |
|---|---|---|
| Generator spacing / padding | 0 px / 0 px | Matches Sprite Editor slicing with zero offset and zero padding. |
| Texture Type | Sprite (2D and UI) | Makes the imported texture available to Unity's 2D sprite workflow. |
| Sprite Mode | Multiple | Allows one texture to produce a sub-asset for every animation frame. |
| Slice Type | Grid by Cell Size | Uses the exact frame width and height recorded during export. |
| Filter Mode for pixel art | Point (no filter) | Prevents Unity from smoothing hard pixel edges when the sprite is scaled. |
| Animation Samples | Your intended FPS | Controls how quickly Unity advances through the selected sprites. |
Check the result
- Unity creates exactly one sub-sprite for each intended frame and no partial extra rectangles.
- All frames use the same pivot and the character remains anchored during playback.
- Pixel art stays sharp at the target camera scale, or smooth artwork uses the intended filtering.
- The clip plays frames in the source order and Loop Time does not introduce an accidental duplicate pause.
- Pixels Per Unit is consistent with other sprites that must share the same world scale.
Common mistakes
Leaving Sprite Mode on Single
Unity then treats the whole sheet as one sprite. Change it to Multiple, Apply, and reopen Sprite Editor before slicing.
Using Automatic slice on a regular animation grid
Automatic slicing follows transparency and can produce inconsistent rectangles. Grid by Cell Size is more deterministic when every frame has a known canvas size.
Treating Point filtering as a universal rule
Point is appropriate for deliberately crisp pixel art. Painted or high-resolution sprites may look better with Bilinear filtering.
Fixing pivot jitter in the Animation window
Per-frame position keys hide an asset alignment problem. Correct the source canvases or sprite pivots so the same animation can be reused cleanly.
Official documentation
Frequently asked questions
Why does Unity import my sprite sheet as one image?
Select the texture, set Texture Type to Sprite (2D and UI), change Sprite Mode from Single to Multiple, click Apply, and then slice it in Sprite Editor.
Should I slice by cell size or cell count?
Use Grid by Cell Size when you know the exact frame width and height from the generator. Cell count is also valid for a perfectly divisible sheet, but pixel dimensions are easier to verify.
How do I stop pixel art from looking blurry in Unity?
For pixel art, use Point (no filter), choose suitable compression settings, keep consistent Pixels Per Unit, and render at an appropriate camera scale. These settings are art-style choices, so smooth sprites may need different filtering.
Does the generator export Unity .meta files?
No. It exports PNG and optional atlas JSON. Unity creates its own metadata after you configure and slice the texture in the editor.
Continue with another workflow
How to make a sprite sheet from images
Turn PNG, JPG, or WebP animation frames into a clean sprite sheet. Choose a grid, verify frame order, and export PNG plus atlas metadata.
How to convert a GIF to a sprite sheet
Convert an animated GIF into a PNG sprite sheet in your browser while preserving frame order and checking the original frame timing.
How to animate a sprite sheet in Godot 4
Prepare a regular sprite sheet, add its frames to AnimatedSprite2D in Godot 4, and verify grid selection, speed, looping, and pixel quality.