Unity Export
Export sprites and sprite sheets for use in Unity with proper metadata and atlas support.
Overview
Export your pixel art from spritesynth in a format optimized for Unity. The export includes sprite sheets and metadata JSON for easy import as Sprite Atlases or individual sprites.
Export Process
Via Editor
- Open your character, object, or tileset in the editor
- Click Export → Unity
- Configure options (scale, layout, background)
- Download the ZIP containing sprite sheet and metadata
Via API
curl -X GET https://api.spritesynth.dev/api/exports/characters/{id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"engine": "unity",
"scale": 2,
"background": "transparent"
}'Export Contents
The export ZIP contains:
character_unity_export/
├── sprite_sheet.png # Combined sprite sheet
├── metadata.json # Sprite slicing and animation data
└── README.md # Import instructionsImporting into Unity
As Sprite Atlas
- Import the sprite sheet PNG into your Unity project
- Set Texture Type to
Sprite (2D and UI) - Set Sprite Mode to
Multiple - Click Sprite Editor → Slice → Grid By Cell Size
- Enter your sprite dimensions (e.g., 16x16)
- Apply and save
As Individual Sprites
- Import the sprite sheet PNG
- Set Texture Type to
Sprite (2D and UI) - Set Sprite Mode to
Multiple - Use the metadata JSON to configure slicing programmatically
Using Metadata JSON
The metadata JSON contains frame positions, dimensions, and animation data:
{
"sprites": [
{
"name": "idle_0",
"x": 0,
"y": 0,
"width": 32,
"height": 32
},
{
"name": "idle_1",
"x": 32,
"y": 0,
"width": 32,
"height": 32
}
],
"animations": {
"idle": {
"frames": ["idle_0", "idle_1"],
"fps": 8
}
}
}Recommended Settings
| Setting | Value |
|---|---|
| Sprite size | 16–64px per sprite |
| Dimensions | Power-of-two (16, 32, 64, 128) |
| Scale | 2x for retina, 1x for pixel-perfect |
| Background | Transparent |
Power-of-Two Sizes
Unity handles power-of-two textures most efficiently. Common pixel art sizes:
- 16×16 — small items, UI icons
- 32×32 — characters, props
- 64×64 — detailed characters, large objects
- 128×128 — tilesets, complex sprites
Tips
- Keep sprite dimensions consistent within a character set
- Use power-of-two dimensions for best GPU performance
- Set pixels per unit to match your sprite size (e.g., 16 for 16px sprites)
- Import at 1x scale for pixel-perfect rendering, then use Unity's pixel perfect camera
Need help?
Join our Discord community for support and tips.
Was this page helpful?