S
spritesynthDOCS

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

  1. Open your character, object, or tileset in the editor
  2. Click Export → Unity
  3. Configure options (scale, layout, background)
  4. 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 instructions

Importing into Unity

As Sprite Atlas

  1. Import the sprite sheet PNG into your Unity project
  2. Set Texture Type to Sprite (2D and UI)
  3. Set Sprite Mode to Multiple
  4. Click Sprite Editor → Slice → Grid By Cell Size
  5. Enter your sprite dimensions (e.g., 16x16)
  6. Apply and save

As Individual Sprites

  1. Import the sprite sheet PNG
  2. Set Texture Type to Sprite (2D and UI)
  3. Set Sprite Mode to Multiple
  4. 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
    }
  }
}
SettingValue
Sprite size16–64px per sprite
DimensionsPower-of-two (16, 32, 64, 128)
Scale2x for retina, 1x for pixel-perfect
BackgroundTransparent

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?

On this page