S
spritesynthDOCS

Game Engine Import Guide

Import spritesynth exports into Unity, Godot, and Tiled — sprite slicing, tilemaps, and resource files.

Overview

After exporting your characters, objects, and tilesets from spritesynth, the next step is importing them into your game engine. Each engine has a slightly different workflow, but the fundamentals are the same: slice sprite sheets into individual frames, set up tilemaps with collision data, and configure animations using the exported timing metadata.

Export Endpoints Reference

Start by exporting your assets:

curl -o character-export.zip https://api.spritesynth.com/v1/characters/{character_id}/export-zip \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -o object-export.zip https://api.spritesynth.com/v1/objects/{object_id}/export-zip \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -o tileset-export.zip https://api.spritesynth.com/v1/tilesets/{tileset_id}/export \
  -H "Authorization: Bearer YOUR_API_KEY"

Import into Unity

Character Sprite Sheet Setup

  1. Extract the exported ZIP into Assets/Sprites/YourCharacter/.
  2. Select the sprite sheet PNG in the Project window.
  3. In the Inspector, set:
    • Sprite Mode → Multiple
    • Pixels Per Unit → Match your pixel size (e.g., 32 for 32×32 sprites)
    • Filter Mode → Point (no filter) — essential for pixel art crispness
    • Compression → None
  4. Click Sprite Editor → Slice → Grid by Cell Size → enter frame dimensions (32×32).
  5. Drag the sliced sprite sheet into the scene. Unity creates a Sprite Renderer.
  6. For animation: select the frames in the Animation window → create Animation Clip → set loop time based on frame_duration_ms in metadata.

Tileset Setup

  1. Import the tileset PNG into Assets/Tilesets/.
  2. Set the same pixel art import settings (Point filter, no compression).
  3. Open Window → 2D → Tile Palette → create new palette.
  4. Drag the sliced tileset into the Tile Palette window.
  5. Use the tile palette brush to paint levels on a Tilemap GameObject.

Import into Godot

Character Animation Setup

  1. Extract the exported ZIP into your project's assets/characters/ folder.
  2. The ZIP includes .tres resource files ready for import.
  3. Drag the sprite sheet into the FileSystem dock. Godot auto-creates a SpriteFrames resource.
  4. In the SpriteFrames resource, set:
    • Animation Speed → Use 1000 / frame_duration_ms FPS (e.g., 150ms = ~6.7 FPS)
    • Filter → Nearest (pixel art crispness)
  5. Assign the SpriteFrames to an AnimatedSprite2D node.

Tileset Setup

  1. Import the tileset PNG into assets/tilesets/.
  2. Create a new TileSet resource.
  3. Add the tileset PNG as a tileset source.
  4. Set tile size to match export dimensions (e.g., 16×16).
  5. Configure collision polygons per tile where needed.
  6. Use a TileMapLayer node with the TileSet to paint levels.

Import into Tiled

Tileset Import

  1. Create a new tileset in Tiled using File → New → Tileset.
  2. Browse to the exported tileset PNG.
  3. Set:
    • Tile Width / Height → Match export dimensions
    • Margin / Spacing → 0 (exported sprite sheets have no padding)
  4. Save the tileset as a .tsx file.
  5. Use the tileset in your maps. Configure terrain sets for auto-tiling.

Terrain Sets and Auto-Tiling

  1. In the Tileset editor, go to the Terrain Sets tab.
  2. Define terrain types (grass, water, stone).
  3. Assign each tile to the appropriate terrain corner configuration.
  4. Enable auto-tiling and use the Terrain Brush to paint large areas instantly.

Tips

  • Always use Point filtering — Linear filtering blurs pixel art. Set filter mode to Point (Nearest) in every engine.
  • Match Pixels Per Unit — If your sprites are 16×16, set PPU to 16 in Unity or import scale to 1 in Godot.
  • Metadata-driven animation — spritesynth's metadata.json contains frame durations. Write a script to read this and configure animations automatically.
  • Batch import — Use asset post-processing scripts in Unity or Godot to apply standard import settings to all spritesynth exports at once.

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page