Version: Unity 6.5 Alpha (6000.5)
Language : English
Working with tilemaps
Hexagonal Tilemaps

Create a tilemap

Create a tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary
that you paint your tiles onto, and a parent grid that acts as a layout guide.

To start your tilemap project, you have to create a tilemap asset that the tile assets are placed on. There are multiple types of tilemaps and you begin by selecting the one that best fits your project. The following are the tilemap types available:

  • Rectangular
  • Hexagonal Point Top
  • Hexagonal Flat Top
  • Isometric
  • Isometric Z as Y

The default tilemap is Rectangular. Refer to the respective pages for Hexagonal and Isometric tilemaps for more information on their specific features and uses.

Prerequisites

Make sure you have the 2D Tilemap Editor package installed. If the package isn’t installed, refer to Package Manager.

Create a new tilemap

Create a tilemap in the Hierarchy window

To create a tilemap asset within the Hierarchy window, follow these steps:

  1. Right-click on the Hierarchy window and select 2D Object > Tilemap to display the available tilemap types.
  2. Select a tilemap type, for example Rectangular. Unity creates a new 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 with a child Tilemap GameObject.

Create a tilemap from the Tile Palette window

To create a tilemap from the Tile Palette window, follow these steps:

  1. Open the Tile Palette window. From the main menu, select Window > 2D > Tile Palette.
  2. To create a new tilemap, open the Active Target dropdown, then open the Create New Tilemap submenu.
  3. Select a tilemap type, for example Rectangular Tilemap.

Create a tilemap from an existing tile palette

To create a tilemap based on an existing tile palette’s settings, follow these steps:

  1. In the Tile Palette window, select a tile palette from the Active Palette dropdown.
  2. Open the Active Target dropdown, then open the Create New Tilemap submenu.
  3. Select From Tile Palette to create a new tilemap with the same settings as the selected tile palette.

Create additional tilemaps on a grid

To create create additional tilemaps on the same grid:

  1. Right-click on the selected Grid GameObject and open the 2D Object > Tilemap dropdown, then select the type of tilemap you want.

Troubleshooting mismatched cell layouts

When you create a tilemap on an existing Grid GameObject, the tilemap might use a different cell layout to the grid. If this happens, Unity detects the mismatch and displays a warning.

Select Continue to continue creating the child tilemap, so Unity changes the parent grid’s Cell Layout property to match the child tilemap. Alternately you can select Cancel to stop creating the new child tilemap.

Note: If you run the Unity Editor in headless mode, this dialog doesn’t appear and the Editor creates the tilemaps automatically as if you selected Continue.

Additional resources

Working with tilemaps
Hexagonal Tilemaps