Tiled is a a popular free level editor tool for 2D games. Users can place down Tiles to create game levels. Tiled has a system for tagging layers and objects with custom properties, which means it can describe levels for many different types of games.
Tiled can be found here:
Tiled TMX Importer is a tool for bringing the open source TMX file format into Unity’s new-in-2017.2 Tilemap system.
The whole Tilemap, Objects, and Layers are imported, including referenced or bundled Tilesets (the Tile images), and Tilemap palettes are created to allow further editing inside Unity. Since the Tile data conversion is one-to-one, gameplay scripts can perform real-time destruction or construction with the tilemap.
The custom properties are also imported, and can be read using custom user scripts to automatically generate gameplay data.
You can find the asset here:
Unity Asset Store
Unfortunately, Unity 2017.2’s Tilemap system is fresh from the oven and doesn’t yet support all the features necessary for an exact import of a Tiled map:
– Only orthogonal maps (no isometric, staggered or hexagonal)
– Slightly broken tile sort orders (it has a ‘top left’, ‘top right’, ‘bottom left’, ‘bottom right’ enumeration on a Tilemap Renderer, but they don’t seem to exactly match what Tiled pushes out whatever mapping I try)
– No per-frame animation times, only a constant Tile animation rate
– Supports per-sprite collision, but only as an outline (so I don’t try and load the collision objects for Tiles, only for objects)
– Broken frustum culling behaviour on large multi-cell tiles
Those are the main missing fundamental features that I’m aware of so far.
My tool doesn’t support the very latest Tiled map format features such as infinite maps or object templates, but that’s my fault 🥉 :3