Version: Unity 6.4 (6000.4)
Language : English
Create an isometric tilemap
Custom tiles and brushes

Add 3D height to an isometric tilemap

To create 3D height on an isometric tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary
, use either of the following methods:

  • Use an Isometric tilemap, and create a separate tilemap for each level of 3D height.
  • Use an Isometric Z as Y tilemap, and set the 3D height of tiles as you paint.

Note: If you set the Mode of a tilemap to Chunk, tiles from multiple textures can sort incorrectly. To avoid this, pack all your tile sprites into a single spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
atlas. For more information, refer to sprite atlases.

Use an Isometric tilemap

To add a new tilemap at a higher level of 3D height, follow these steps:

  1. Select the grid GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
    See in Glossary
    in the Hierarchy window, then in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    window set Cell Layout to Isometric.
  2. In the Hierarchy window, right-click the grid GameObject and select 2D Object > Tilemap to create a new tilemap as a child of the grid.
  3. In the Inspector window of the new tilemap, set Order in Layer to a higher value. This makes sure Unity renders the new tilemap in front of the original tilemap.
  4. To move the tilemap up in 3D height, increase the x and y values of the Tile Anchor property. For example, add 0.5 to both the x and y values.
  5. In the Tile Palette window, set Active Target () to the new tilemap.
  6. Paint the tiles into the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
    See in Glossary
    view.

Use an Isometric Z as Y tilemap

In an Isometric Z as Y tilemap, each tile has a z value that represents its 3D height. Unity adds the z value to the 2D y position of the sprite, to position it higher up in the scene.

Follow these steps:

  1. Select the grid GameObject in the Hierarchy window, then in the Inspector window set Cell Layout to Isometric Z as Y.

  2. In the 2D renderer asset, set the Transparency Sort Mode to Custom Axis.

  3. Set the z value of Transparency Sort Axis to the z-axis sort value.

    To calculate the z-axis sort value, take the y value of the Cell Size of the grid GameObject, multiply it by negative 0.5, then subtract 0.01. For example, if the y value of the grid is 0.5, the z-axis sort value is 0.5 × –0.5 - 0.01 = –0.26.

    If you don’t set the z-axis sort value, tiles at higher 3D heights can render in front of tiles at lower 3D heights.

    A tower on an isometric grid. On the left, the z value of Transparency Sort Axis is 0, and the tiles of the tower sort incorrectly. On the right, the z value is -0.26, and the tiles sort correctly.
    A tower on an isometric grid. On the left, the z value of Transparency Sort Axis is 0, and the tiles of the tower sort incorrectly. On the right, the z value is –0.26, and the tiles sort correctly.
  4. In the Tile Palette window, disable Lock Z Position.

  5. Set Scene ViewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
    See in Glossary
    Z Position
    to the 3D height you want to paint at. For example, set Scene View Z Position to 1 to paint tiles one unit above the ground.

    You can also press - and + to increase and decrease the 3D height of the tile while you paint.

The Scene view displays a white outline of the tile at ground level, and a blue outline of the tile at the 3D height.

The Scene view with the brush preview and the blue and white outlines.
The Scene view with the brush preview and the blue and white outlines.

To remove a tile with the Erase tool, set Scene View Z Position to the same 3D height value as the tile you want to remove.

To adjust the gap between 3D height layers, select the grid GameObject and adjust the z value of the Cell Size property.

Position sprites between tiles

By default, tilemaps render in Chunk mode, which means that Unity renders multiple tiles together in single batches. This approach increases performance and ensures tiles sort correctly, but other objects in the scenes can’t appear between tiles at different depths.

To avoid this, follow these steps to set tilemaps to render in Individual mode:

  1. In the Hierarchy window, select the tilemap GameObject.
  2. In the Inspector window, in the Tilemap Renderer component, set Mode to Individual.

Unity now sorts tiles and sprites together, so characters and other objects can appear between tiles at different depths. Individual mode can reduce performance, because Unity renders each sprite individually on the tilemap.

A meadow with a tower on an isometric tilemap. A character stands behind the castle so their bottom half is correctly hidden behind the castle.
A meadow with a tower on an isometric tilemap. A character stands behind the castle so their bottom half is correctly hidden behind the castle.

Additional resources

Create an isometric tilemap
Custom tiles and brushes