Skip to content

Unity Sprite Sheet Slicer — Sprites and Clips for Unity 6

Measure the grid instead of guessing it in the Sprite Editor, name the animations on a timeline, and export a bundle whose editor script creates the sprites with their pivots and one AnimationClip per animation.

To use a sprite sheet in Unity 6, set the PNG's Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple, open the Sprite Editor and choose Slice › Grid By Cell Size: Pixel Size is the frame size, Offset the margin and Padding the spacing. For pixel art also set Filter Mode to Point (no filter), Compression to None and one Pixels Per Unit for every sprite, then build an AnimationClip from the sprites. Nerulio can do the measuring and the clip building: it exports the PNG, a JSON and an editor script that writes every sprite rect with its pivot and one clip per animation. Checked in Unity 6000.5.3f1.

Drop a sprite sheet, numbered frames, a GIF / APNG or an .aseprite file
Runs in your browser. Files are not uploaded.
Studio Sprite workspace: a 48 px samurai sheet with the detected grid, 60 frames in 10 animations, before Apply
The real Studio with a CC0 asset (OpenGameArt).
Exports to
  • Unity 6Verified· Unity 6000.5.3f1
  • Godot 4Verified· Godot 4.7.2
  • Phaser 3 / 4Verified· Phaser 3.90 + 4.2
  • PixiJS 8Verified· PixiJS 8.21
  • Aseprite JSONVerified· Phaser load.aseprite · PixiJS 8.21
  • .asepriteVerified· Aseprite 1.3.18
  • Spine / libGDXVerified· spine-canvas 4.2
  • Starling / Sparrow XMLVerified· Phaser 4.2
  • LÖVEVerified· LÖVE 11.5
  • DefoldBuilt· Defold bob.jar 1.13.1
  • GameMakerUNVERIFIED
  • CSS spritesVerified· Chromium
  • GIF / APNGDecoded· Pillow

How Unity turns one texture into many sprites

Unity keeps a sprite sheet as one texture asset with several Sprite sub-assets. Sprite Mode Multiple says the image holds several elements; the Sprite Editor stores one rectangle and one pivot per sprite. Its Slice menu offers Automatic (islands separated by transparency), Grid By Cell Size, Grid By Cell Count and Isometric Grid. For a grid, Pixel Size is the cell, Offset shifts the grid from the top-left corner, Padding is the space between sprites, and Keep Empty Rects decides whether blank cells become sprites.

Pixels Per Unit sets how many texture pixels make one world unit: a 64 px frame is 0.64 units at the default 100 and exactly 1 unit at 64. The 2D Pixel Perfect documentation asks for the same PPU on all sprites, Filter Mode Point and Compression None; Bilinear filtering and compression are what make pixel art look soft or smeared.

An animation in Unity is an AnimationClip whose keys swap the SpriteRenderer's sprite at given times, played by an Animator through an Animator Controller. Creating a clip in the Animation window also creates the controller and the Animator component for you. A clip made by hand from a sheet usually has one fixed frame rate for every sprite.

Nerulio measures the grid (with a confidence you can overrule), lets you name the row animations, set per-frame times and pivots, and exports three files. Its editor script sets the texture to Sprite / Multiple / Point / Uncompressed / no mipmaps / PPU 100, writes one sprite rect per frame with its pivot, and creates one .anim per animation whose keys sit at each frame's own start time.

Sprite Mode Multiple
The texture holds several sprites whose rects are set in the Sprite Editor.
Pixels Per Unit (PPU)
Texture pixels per world unit; keep it the same on every sprite of a game.
Grid By Cell Size
Slice type with Pixel Size (cell), Offset (margin) and Padding (spacing).
Pivot
The sprite's origin; normalised 0–1 inside the rect, y up.
AnimationClip
Keys that change SpriteRenderer.sprite over time; played by an Animator.

Worked example: 384 × 128 sheet, two animations

Sheet 384 × 128 px: 2 rows × 6 columns of 64 × 64, no margin, no spacing
  Grid By Cell Size: Pixel Size 64 × 64, Offset 0 × 0, Padding 0 × 0 → 12 sprites
  world size: 64 px / PPU 100 = 0.64 units      64 px / PPU 64 = 1 unit

Nerulio export (rows named idle and run, frames 125 ms, pivot bottom centre):
  rect y in Unity (origin bottom-left) = page height − (y + h)
  pivot bottom centre → (0.5, 0) inside each rect
  run.anim keys: 0, 0.125, 0.25, 0.375, 0.5, 0.625 s + closing key at 0.75 s
  loop on (repeat ∞)      clip frame rate 10

The closing key repeats the last sprite so that it also lasts its full 125 ms before the clip wraps.

What it does

  • Cells, margin and spacing measured from the art; empty cells are left out.
  • Per-frame pivots (click or type) that land in each sprite rect.
  • Sprite Mode Multiple, Point filter, Compression None set by the script.
  • One AnimationClip per tag with the frame durations; checked in Unity 6000.5.3f1 batch mode.

How to do it

  1. Drop the sheet and press Apply.
  2. Name animations, set timing and pivots.
  3. Open Pack & Export and pick Unity 6.
  4. Copy the bundle (with its Editor folder) into Assets/.

Files you get

Pack & Export › Unity 6 writes (named after your file; hero here):

FileWhat it is for
hero.pngThe packed frames (trim on, 2 px apart, never rotated); several pages for large sets.
hero.unity.jsonEvery sprite rect already in Unity's bottom-left coordinates, its normalised pivot, and the clips with each frame's milliseconds.
Editor/NerulioSpriteImporter.csThe editor script behind Tools › Nerulio › Import Studio JSON: import settings, sprite rects, AnimationClips.
README-UNITY.mdThe steps below for this bundle.

Bring it into Unity 6

  1. Copy the unzipped folder into Assets/, for example Assets/Characters/Hero/, keeping the PNG next to the JSON. The Editor folder with NerulioSpriteImporter.cs is compiled by Unity; it needs the 2D Sprite package (com.unity.2d.sprite), which every 2D template includes.
  2. Choose Tools › Nerulio › Import Studio JSON and pick hero.unity.json inside your project.
  3. The script sets the texture to Sprite (2D and UI), Multiple, Point (no filter), Uncompressed, no mipmaps, PPU 100, and writes one sprite per frame with its pivot. Open the Sprite Editor to see the rects.
  4. It also writes one clip per animation next to the JSON (idle.anim, run.anim), keying the SpriteRenderer's sprite at each frame's time, with Loop Time as tagged.
  5. Put the clips in an Animator Controller and assign it to an Animator on a GameObject with a SpriteRenderer.
  6. If your game uses another PPU (16 for 16 px tiles, say), change Pixels Per Unit on the texture afterwards, the same for every sprite.

Without Nerulio: select the PNG, set Texture Type to Sprite (2D and UI), Sprite Mode to Multiple, Filter Mode to Point (no filter) and Compression to None, and apply. Open the Sprite Editor, choose Slice › Grid By Cell Size, enter Pixel Size, Offset and Padding and a Pivot, press Slice and then Apply. Then open Window › Animation › Animation, create a clip for your GameObject and key its sprite at a fixed rate.

Check the result

  • The Sprite Editor shows one rect per filled cell, each with its pivot marker at the feet.
  • The texture Inspector reads Filter Mode Point (no filter) and Compression None.
  • In the Animation window run.anim has six keys 0.125 s apart and ends at 0.75 s.
  • At an integer zoom in the Game view the pixel edges stay hard, and the feet do not move between frames.

Troubleshooting

SymptomLikely causeHow to checkFix
Sprites look soft or smearedBilinear filtering or texture compressionTexture Inspector: Filter Mode and CompressionPoint (no filter) and None; see blurry pixel art in Unity
Slices drift or cut sprites in halfPixel Size includes the gap, or Offset / Padding are wrongCompare the red slice outlines with the art at the last columnEnter the measured cell, margin and spacing; see frame size
Tools › Nerulio is missing or the script does not compileThe script is not in a folder called Editor, or the 2D Sprite package is missing (3D template)Console errors about UnityEditor.U2D.SpritesKeep Editor/NerulioSpriteImporter.cs; install 2D Sprite in the Package Manager
"is not inside this project's Assets folder"The JSON picked in the file dialog lies outside Assets/Path shown in the errorCopy the bundle into Assets/ and pick that copy
Sprites have the wrong size next to your tilesThe export uses PPU 100 and your tiles another valueCompare Pixels Per Unit on both texturesSet the same PPU on every sprite texture
Your own import changes are goneRunning Import Studio JSON again re-applies Point, Uncompressed, PPU 100 and recreates clips of the same nameDid you re-run the menu after editing?Re-apply your changes after each import, or rename clips you edited by hand

Other ways to do it

OptionWhen it is the better choice
Unity's own Sprite Editor slicing (manual route above)A uniform sheet and a few clips at one frame rate: nothing extra in the project.
Slice › AutomaticSprites separated by transparency and no need for equal cells; check the pivots, because each rect gets its own size.
The .aseprite source insteadTags and per-frame timing come along: Aseprite to Unity.
A TexturePacker atlasFrames already packed with their data: TexturePacker to Unity.

Engine exports and how each was checked

"Verified" means the exported files were loaded by the real engine or tool on real CC0 assets and the result was compared with the source. Anything that was not loaded is labelled as such.

TargetFilesCheck
Godot 4.tres SpriteFrames · .tscn AnimatedSprite2D · .png.importVerified Godot 4.7.2Loaded by Godot; every animation frame drawn and compared with the source file. The scene uses Nearest filtering; rotation is never used.
Unity 6.unity.json · Editor/NerulioSpriteImporter.cs · AnimationClipVerified Unity 6000.5.3f1Batch mode: sprite rects, pivots, pixels, clip keys and durations checked.
Phaser 3 / 4atlas JSON (multiatlas) · .anims.jsonVerified Phaser 3.90 + 4.2Frames and animations drawn by both versions.
PixiJS 8spritesheet JSON · animations · anchor · meta.scaleVerified PixiJS 8.21Rotated and multi-page atlases included.
Aseprite JSONhash / array · frameTags · slicesVerified Phaser load.aseprite · PixiJS 8.21Tags keep their direction and repeat count.
.asepritelayers · tags · durations · slicesVerified Aseprite 1.3.18Opened and rendered by the Aseprite command line.
Spine / libGDX.atlasVerified spine-canvas 4.2Every region drawn by the Spine runtime, rotated and trimmed; libGDX itself was not run.
Starling / Sparrow XMLXML per pageVerified Phaser 4.2Phaser 3.90 draws trimmed XML frames wrongly (its own bug); the "Sparrow XML (Phaser 3)" preset turns trim off and passes in 3.90 and 4.2.
LÖVELua quads · nerulio_atlas.lua · main.luaVerified LÖVE 11.5Every frame drawn and every animation stepped through the shipped helper.
Defold.atlas · .tilesourceBuilt Defold bob.jar 1.13.1Built by Defold's command-line builder; the built texture's UVs were read back.
GameMakerspr_<name>_stripN.png · gamemaker.jsonUNVERIFIEDNot loaded in GameMaker (no headless GameMaker). The strips are cut the way its strip importer cuts them.
CSS sprites.css · preview .htmlVerified ChromiumEvery class drawn from the shipped stylesheet.
GIF / APNGone file per animationDecoded PillowEvery frame and delay decoded again after export; APNG is exact.

Evidence

GIF decoder: 408 of 408 frames identical to Pillow on 29 real GIFs; APNG 132 of 132 on 16 files. .aseprite: 231 corpus files imported, re-written and reopened in Aseprite 1.3.18 with the same tags, durations and pixels (231/231). Exports: 49 runs in the real engines on real CC0 assets, 47 pass — the 2 failures are Phaser 3.90's trimmed-XML bug, which the Phaser 3 preset avoids.

Limits

  • The export always writes PPU 100; change it in Unity if your game uses another value.
  • The verification checked rects, pivots, pixels and clip keys, not clips playing through an Animator at runtime.
  • Hitboxes and collision polygons are not written for Unity; they stay in the generic JSON.
  • A grid or island guess is a preview with a confidence; nothing is cut until you press Apply, and every choice has one-click alternatives.
  • .aseprite files whose layers do not compose exactly (e.g. group opacity) are imported flattened, and the Import panel says why.
  • Rotated frames in an imported atlas stay rotated; their export is UNVERIFIED.
  • Images up to 32,768 px per side (268 million pixels), subject to your browser's memory.

Versions and sources

Nerulio's Unity bundle was run in Unity 6000.5.3f1 batch mode: the shipped importer's Apply and CreateClips were called (by reflection, because the menu opens a file dialog), and Point filtering, Uncompressed, Multiple mode, 60 of 60 sprite rects of a 288 × 480 samurai sheet, identical art, one common pivot anchor and the clip keys and times were read back. The Unity steps and settings named above follow the Unity 6 manual and the 2D Pixel Perfect package documentation.

Official documentation used

Questions

Which Unity versions?

The bundle was checked in Unity 6000.5.3f1. Older versions were not tested.

Can I keep my existing sheet layout?

Turn trim and rotation off and the packed page keeps frames whole; the sprite rects then follow the packed layout.

Is it free, and do I need an account?

Everything on these pages is free and works without an account. There is no watermark and no export that is held back.

Are my sprites uploaded?

No. The Studio decodes, packs and exports in this browser tab. Projects are autosaved in the browser (IndexedDB) and can be saved as a .nerulio file.

Does it need Aseprite or an engine plugin installed?

No. .aseprite files are read and written in the browser, and each engine bundle carries what that engine needs (for Godot, the import settings and scene; for Unity and the Godot TileSet, a small editor script).