pixel.ignlab.net / Guides / Sprite sheets for Unity/Godot
How to Export a Sprite Sheet for Unity or Godot
Pack sprites into one file, understand the JSON atlas that comes with it, and get it into your engine.
What a sprite sheet actually is
A sprite sheet is a single image containing many smaller sprite frames laid out in a grid. Engines load one texture instead of hundreds of individual files, which is faster to load and easier to manage. Alongside the sheet, an atlas — usually a small JSON or XML file — records where each frame sits: its x/y position and its width and height in pixels.
Packing a sheet with the Sprite Sheet Maker
Generate or draw a sprite in the Sprite Sheet Maker, then open the Sprite sheet + atlas panel in the sidebar and set three things:
- Count — how many seeded variations to generate (up to 256)
- Cols — how many frames wide before it wraps to a new row
- Scale — the per-frame pixel scale on export
Click Export sheet + JSON. Two files download: a single PNG sheet, and a JSON atlas listing every frame's position.
Reading the atlas
Each entry in the atlas looks roughly like this — an array of frames, each with pixel coordinates on the sheet:
{
"frames": [
{ "x": 0, "y": 0, "w": 32, "h": 32 },
{ "x": 32, "y": 0, "w": 32, "h": 32 },
{ "x": 0, "y": 32, "w": 32, "h": 32 }
]
}
That's all a game engine needs to slice the single PNG back into individual sprites.
Using it in Unity
If every frame is the same size (which it will be, since a sheet is built from one generator or canvas), import the PNG and open Unity's Sprite Editor. Set Sprite Mode to Multiple, then use Slice → Grid By Cell Size and enter the frame width/height from the atlas. Unity will cut the sheet into individual sprites automatically, matching the same layout the atlas describes.
Using it in Godot
In Godot, import the PNG as a texture, then create an AtlasTexture resource for each frame — set its Atlas to the sheet and its Region to the frame's x/y/width/height from the JSON. For an animated sprite, add each AtlasTexture as a frame in a SpriteFrames resource on an AnimatedSprite2D node.
Animating instead of packing variations
If you're exporting a walk cycle or other animation rather than random variations, use the timeline's Strip + JSON export instead — it packs your actual animation frames in sequence, with the same kind of atlas.
Ready to build one? Open the Sprite Sheet Maker and pack your first sheet.
Open Sprite Sheet Maker →