Export Tiled maps for Godot, Unity and other engines
Tiled MCP Pro saves and exports through Tiled's own writers, so the files are exactly what Tiled would write if you used its menus. This guide covers which tool to call for each engine and what to check before importing. Export tools are in full mode.
1. See what your Tiled can write
Formats come from Tiled and its plugins, so the list depends on your install. Ask for it first:
Call get_export_formats and list the map formats that can write.
Then export with export_map, passing the output path and the format name from that list (default tmx). Shortcuts exist for the common ones: export_map_to_json, export_map_to_lua, export_map_to_csv.
| Format | Typical use |
|---|---|
tmx (XML) | The native format. Read by most importers and libraries. |
json (.tmj) | Web and JavaScript engines, custom loaders. |
lua | LÖVE (with a loader such as STI), Defold-style Lua pipelines. |
csv | One layer of tile IDs as plain numbers; simple custom loaders. |
| Plugin formats | Godot 4 scene, GameMaker, Defold and others, when the plugin is enabled. |
If a format you expect is missing, enable its plugin in Tiled under Edit > Preferences > Plugins and ask again.
2. Keep paths portable
Maps refer to tilesets and images by relative path. Before exporting for an engine, keep the map, its .tsx files and the images inside the engine project (or copy them in together), and save there with save_map. Then the relative paths still resolve after import.
Godot 4
- Tiled's Godot 4 exporter: writes a
.tscnscene with a TileMap and its TileSet. Export into your Godot project folder: the exporter buildsres://paths relative to the project. Read Tiled's documentation for the exporter's options and limits (for example, which object types it converts). - Importer add-ons: keep
.tmx/.tsxin the project and let an add-on import them on every change. Useful if you keep editing the map in Tiled.
Save the map as C:/games/mygame/levels/level1.tmx, then export it
to C:/games/mygame/levels/level1.tscn using the Godot format from
get_export_formats.
Pair it with Godot MCP Pro to have the AI wire the imported level into your scenes.
Unity
Unity has no Tiled importer built in. The usual route is an importer package such as SuperTiled2Unity, which reads .tmx and .tsx directly. Keep tilesets external (.tsx) and inside the Unity project's Assets folder, and save the map as .tmx. Custom properties and object classes come through as data you can read in scripts, so set them in Tiled (set_property, add_object with class_name).
Other engines and frameworks
- Phaser and other web engines: export JSON. Phaser's loader expects tilesets embedded in the map JSON, so embed them in Tiled before exporting.
- LÖVE: export Lua and load it with a library such as STI.
- Defold, GameMaker: use the plugin formats if enabled in your Tiled.
- MonoGame, Bevy, raylib, custom engines: TMX or JSON through a Tiled loader library for your language.
Tilesets and preview images
export_tilesetwrites a tileset on its own (defaulttsx), for example after the AI added terrain sets or Smart Tiles rules.render_map_to_imagewrites the whole map as a PNG: a minimap, a store screenshot, or a reference for an artist.- Smart Tiles rules travel inside the tileset as a custom property; engines simply ignore it.
Export checklist
validate_map: no missing images, no empty or unused layers you did not intend.- Layer and object class names match what your import code expects.
- Map, tilesets and images live inside the engine project.
save_mapas.tmxfirst, then export the engine format.- Commit both, so you can re-export after the next round of edits.
Get Tiled MCP Pro
$10 once on itch.io, free updates.