Aseprite to Unity: Complete Sprite Export Workflow
Aseprite and Unity are one of the most common pairings in indie 2D development — Aseprite for drawing, Unity for running. But the handoff between them involves more decisions than it first appears: export format, pixel density, slicing method, and animation clip setup all affect how your sprites look and behave in the final game.
This guide walks through the complete export-to-animation workflow, from Aseprite's export settings to Unity's Animator setup, including the import settings that are easy to miss and cause visual artifacts in pixel art games.
Exporting Sprite Sheets from Aseprite
In Aseprite, go to File → Export Sprite Sheet. The key settings to configure before exporting:
- Sheet type: By Rows — packs all frames in a single horizontal strip per animation tag, easiest to slice in Unity's Sprite Editor
- Layers: Merged — unless you're exporting each layer separately for shader effects or parallax
- Padding: Add 1px border padding between frames to prevent texture bleeding at runtime
- Trim: Leave unchecked — trimming frames to their content bounds creates variable frame sizes that break uniform slicing
- Output file: Save as PNG to preserve transparency
If your project has multiple animation states (idle, walk, run, attack), export each as a separate sprite sheet PNG rather than combining them into one large atlas. Unity's Sprite Editor handles separate sheets cleanly, and keeping them separate makes asset management easier when you update individual animations.
💡 Use Aseprite's Tags feature to mark animation ranges before exporting. With the Split Layers option, you can also export each tagged animation to its own file automatically.
Setting the Correct Pixels Per Unit
Unity's Pixels Per Unit (PPU) setting determines how many pixels in your sprite equal one Unity unit in world space. Getting this right is the single most important import setting for 2D games, because it controls both visual scale and physics-relevant measurements.
The rule is straightforward: set PPU to match your frame size. A 32×32 pixel character sprite should use PPU = 32. A 16×16 sprite uses PPU = 16. A 64×64 sprite uses PPU = 64. This ensures that one sprite takes up exactly one Unity unit in world space by default, making scale and physics calculations consistent across your project.
Set PPU consistently across all sprites in your project. The easiest way is to configure a default texture import preset in Edit → Project Settings → Editor → Default Behavior Mode and update the default Sprite import settings.
Unity Sprite Editor: Slicing Setup
Once your PNG is imported into Unity's Project panel, select it and configure the import settings in the Inspector:
- Set Texture Type to
Sprite (2D and UI) - Set Sprite Mode to
Multiple - Set Pixels Per Unit to your frame size (e.g. 32)
- Set Filter Mode to
Point (no filter)— this is essential for pixel art; Bilinear blurs pixel edges - Set Compression to
None— lossy compression introduces color artifacts on pixel art - Uncheck Generate Mip Maps — 2D games don't use mipmaps and they waste memory
- Click Apply
Now open the Sprite Editor (button in the Inspector). Click Slice → Grid By Cell Size and enter your frame dimensions. If your sheet includes padding, enter the same value in the Padding field. Set the Pivot to match your art — typically Bottom for character sprites so the character stands on the ground position correctly. Click Slice, then Apply in the top-right of the Sprite Editor.
💡 If slicing produces unexpected results, use Slice → Automatic first to see where Unity detects sprite boundaries, then switch back to Grid By Cell Size if needed. Automatic mode can reveal whether your sheet has unexpected transparent padding.
Creating Animation Clips from Sliced Frames
With the sprite sheet sliced, Unity provides two paths to create animations. The faster path: select all sliced sprites for one animation state in the Project panel, then drag them directly into the Scene or Hierarchy view. Unity will automatically prompt you to save an AnimationClip and create a GameObject with an Animator component attached.
For more control, use the Animation window directly:
- Select your character GameObject and open Window → Animation → Animation
- Click Create to create a new AnimationClip (name it
CharacterIdle) - In the Project panel, expand the sprite sheet asset to see individual sliced frames
- Select all frames for the idle animation (Shift+click) and drag them into the Animation timeline
- Unity places them at even intervals; adjust the Samples value to control FPS
In the Animator Controller, set looping on idle and walk animations by checking Loop Time in the AnimationClip inspector. For one-shot clips like attack or death, uncheck Loop Time and add a transition back to idle when the clip ends.
Common Import Mistakes to Avoid
Even experienced developers run into these issues when switching between projects or working with assets from other sources:
Default instead of Sprite (2D and UI) means Unity treats the sheet as a standard texture, not a sprite. The Sprite Editor won't be available and the asset won't work with SpriteRenderer components.Point (no filter) for pixel art sprites.None or use Lossless for 2D sprite textures.🛠 Free Tools Referenced in This Guide
- Sprite Slicer Pro — Slice Aseprite exports into individual frames before Unity import
- Sprite Sheet Packer — Repack individual frames into a clean sprite sheet atlas
- Sprite Animation Previewer — Preview frame sequences and verify timing before importing