← Blog
·28 min read·SpriteForge Team·Unity

How to Create Unity-Ready Sprite Sheets from Video

A step-by-step workflow for turning video or GIF into sprite sheets that import cleanly into Unity's Sprite Editor and 2D Animation.

Unity sprite sheet workflow 1. Export 2. Import PNG 3. Slice + JSON 4. 2D Anim  Video/GIF � FPS + scale � Unity JSON + PNG � Sprite Editor � AnimatedSprite Key tips Sprite Mode: Multiple � Texture Type: Sprite (2D and UI) � Use import script for JSON � SpriteMetaData Point filter for pixel art � Keep texture under 2048/4096 � Match FPS in Animation clip

Getting sprite sheets from video or GIF into Unity without re-slicing or misaligned pivots is mostly about export settings and one-time import setup. This guide walks through a complete workflow that matches how Unity's Sprite Editor and 2D Animation package expect data: one texture, one JSON that describes every frame. We cover export choices, import steps, pivot handling, animation setup, and how to avoid the usual pitfalls so your sheets work first time.

Why Unity's Format Matters

Unity doesn't read "sprite sheets" as a single asset by default. It sees a texture and, in Multiple mode, a set of rectangles (and optionally pivot, border, etc.). If your export tool outputs frame positions and sizes in the structure Unity expects, you can point the Sprite Editor at the PNG and the JSON and get correctly sliced sprites without hand-drawing rectangles. That means: use an exporter that outputs Unity-compatible metadata.

When you use a single PNG plus a JSON that matches Unity's expected shape, you avoid the tedious work of manually defining rects for dozens or hundreds of frames. The Sprite Editor can then apply the slice data in one go, and your animations will align correctly with the original timing and layout. Investing in a small import script or using a tool that outputs Unity format pays off quickly when you have multiple characters or effects.

Without the right format, you end up re-slicing by hand in the Sprite Editor or writing one-off conversion scripts. With it, your pipeline is repeatable: artists export once, you import once, and the result is ready for the 2D Animation package or for script-driven sprite swapping. The rest of this guide assumes you have or will create that pipeline.

Step 1: Export From Your Source

In the Video to Sprite Sheet tool, set your source (video or GIF), then FPS and scale. For character animations we usually use 12–24 FPS; for VFX or UI, 24–30. Scale depends on your target resolution: 100% keeps native size, 50% halves it (good for atlases that must fit under 2048 or 4096). Set max frames if you only need a clip. Choose a layout: packed (best space), row (one row), or grid (fixed columns). Export format: Unity. Download the PNG and the JSON.

If your source is a GIF, ensure the tool respects the GIF's frame delay so that the exported metadata reflects the correct timing. For video, the FPS you choose will determine how many frames are sampled per second—higher FPS means more frames and a larger sheet, so balance smoothness with texture size. Many teams export at 12 FPS for character idle/walk and 24 FPS for attacks or UI effects.

Export checklist

  • Source: video file or GIF with the frames you need.
  • FPS: match your target animation speed (e.g. 12 for character, 24 for VFX).
  • Scale: 100% for 1:1, or 50% to fit more on a 2048/4096 texture.
  • Layout: packed for smallest sheet; row or grid if your pipeline expects it.
  • Format: Unity. Download both the PNG and the JSON.

Keep the JSON next to the PNG (same folder and base name) so your import script can find it easily. If you export multiple sheets (e.g. one per character), keep each pair together; the script can look for a JSON with the same name as the texture.

Step 2: Import Into Unity

Drop the PNG into your Assets folder. Select it; in the Inspector set Texture Type to Sprite (2D and UI) and Sprite Mode to Multiple (see Texture Importer). Click Apply. Open Sprite Editor: you'll see the full texture but no slices yet. Unity can't auto-import our JSON from the Sprite Editor UI alone; you have two options. Option A: use a small editor script that reads the JSON and calls SpriteMetaData to create one rect (and pivot) per frame, then apply. Option B: if your exporter writes a format that Unity's built-in pipeline can read (e.g. .tpsheet or a known JSON shape), use that. Many teams use Option A once and reuse the script for every new sheet.

The editor script typically runs in the context of the AssetPostprocessor or a menu item: it locates the JSON next to the PNG (or in a known path), parses the frame list, builds an array of SpriteMetaData with rect and pivot for each frame, assigns it to the texture's sprite sheet, and calls Apply(). Once that's in place, every new sheet you export with the same format can be sliced automatically on import or via a single menu click.

What the import script does

Conceptually: read the JSON, find the "frames" or equivalent array, and for each entry create a SpriteMetaData with rect (x, y, width, height in pixels), name (from the frame id or index), and pivot (normalized 0–1 or from metadata). Append these to the texture importer's spriteSheet array and call Apply(). Unity then treats the texture as multiple sprites. You can trigger the script from an AssetPostprocessor.OnPreprocessTexture when the PNG is imported, or from a menu item so artists run it after dropping new sheets. Either way, the goal is zero manual slicing.

Step 3: Pivot and Alignment

Pivot matters for animation (e.g. feet on ground, center for rotations). Our Unity export includes pivot per frame; the import script should set SpriteMetaData.pivot from the JSON. Typical values are (0.5, 0) for bottom-center or (0.5, 0.5) for center. If your tool exports in normalized 0–1 space, multiply by width/height when building the rects.

For character sprites that need to stay grounded, bottom-center pivot (0.5, 0) is standard. For VFX or rotating objects, center pivot (0.5, 0.5) is often better. Some engines and rigs expect pivot in pixels; Unity's SpriteMetaData uses normalized values (0–1), so ensure your script converts correctly when reading from the JSON. Consistent pivot across all frames of an animation avoids jitter and misalignment when swapping sprites.

If your export tool doesn't provide pivot, you can default all frames to (0.5, 0) or (0.5, 0.5) in the import script. For character sheets, bottom-center is almost always correct; for effects, center is safe. Only override per-frame when you have explicit pivot data from the exporter.

Step 4: 2D Animation Package

Once sprites are sliced, create a Sprite Library Asset (if you use 2D Animation), add your character or object as a category, and add each sprite. Then in the Animation window you can keyframe sprite swaps using these sprites. Frame rate in the animation clip should match the FPS you used during export so that keyframes align with the original timing.

If you're not using the 2D Animation package, you can still drive sprite changes via script: keep a reference to the SpriteRenderer, hold an array of sprites in frame order, and advance the index based on elapsed time and your target FPS. The same principle applies—keep playback FPS in sync with export FPS so that one keyframe per exported frame gives you the intended motion.

Animation clip setup

In the Animation window, add a property for the sprite renderer's Sprite. Keyframe it every N seconds where N = 1 / export FPS (e.g. 1/24 ≈ 0.0417 s per frame for 24 FPS). Use the sprites in order. For looping, set the clip to Loop. If you have multiple animations on one sheet (e.g. idle, walk), create one clip per animation and reference the correct slice range; your export metadata may name or index these so you can map "idle" to frames 0–7 and "walk" to 8–15.

Common Pitfalls

  • Texture size: Keep under your target max (e.g. 2048 or 4096). Use scale or max sheet size in the exporter to stay within limits.
  • Filtering: For pixel art, set the texture to Point (no filter) and disable compression on the sprite sheet until you're happy with the look.
  • Multiple sheets: If the exporter splits into several PNGs (e.g. row layout with many frames), import each PNG separately and run your slice script on each; then reference the right texture in your animations.
  • Naming: Unity can name slices by index or from metadata. Consistent naming (e.g. from your export) makes it easier to reference sprites in code or in the 2D Animation package.
  • Read/Write: If you need to access pixels at runtime, enable Read/Write on the texture; otherwise leave it off for better memory use.
  • Missing JSON: If the script can't find the JSON, slices won't be created. Use a consistent naming convention (e.g. hero.png + hero.json) and document it for the team.

Next Steps and Variations

After the first sheet works, replicate the pipeline for other characters or effects. Consider a shared import script in your project that runs on any PNG that has a matching JSON. If you add new export formats later (e.g. trim data, custom pivot per frame), extend the script to read those fields and set the corresponding SpriteMetaData properties. Unity's 2D Animation and Sprite Editor docs have more on advanced options like 9-slice and mesh generation if you need them.

Wrapping Up

Using a single, consistent pipeline (export Unity JSON + small import script) keeps Unity sprite setup fast and repeatable across many characters and effects. Once the pipeline is in place, artists can export from video or GIF and get game-ready sprites in Unity with minimal manual steps. We recommend documenting your FPS and scale conventions so that everyone on the team produces sheets that fit your engine limits and animation style.