Version: Unity 6.4 (6000.4)
Language : English
Create a tile palette
Save and reuse a tile selection with Brush Picks

Paint tiles into the scene

After you create a tile palette, create a tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary
in 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
and paint your tiles onto it.

Create a tilemap in the scene

  1. Make sure the 2D 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
    package is installed in your project. For more information, refer to set up your project for 2D games.
  2. In the Hierarchy window, right-click and select 2D Object > Tilemap to display the available tilemap types.
  3. Select the tilemap type that matches your tile palette. The default tilemap type is Rectangular.

Unity creates the following:

  • A 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
    . This is a layout guide that extends infinitely in all directions.
  • A child tilemap GameObject. This is the tilemap that you paint your tiles onto.

Select the grid or the tilemap to display its grid in the 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
.

Paint tiles onto the tilemap

Follow these steps:

  1. Open the Tile Palette window and select a tile palette or tileset.

  2. Set Active Target () to the tilemap you want to paint onto.

  3. In the toolbar, select the Paint with Active Brush () tool.

  4. Select a tile from the tile palette. This makes the tile the active brush and highlights it with a white outline. To select multiple tiles, click and drag.

    To select a tile from the tilemap in the Scene view instead of the tile palette, hold Ctrl (macOS: Cmd) and select a tile in the Scene view.

  5. Paint into the Scene view.

Note: If you paint with a set of multiple tiles, the brush preview can change as the cursor hovers over neighboring rows or columns. This effect is more pronounced when you paint on hexagonal tilemaps.

To fill areas with tiles instead, or draw lines or paint random tiles, use the other tools and scriptable brushes in the Tile Palette window. For more information, refer to Tile Palette editor tools.

Move and edit tiles

To select a tile in the Scene view for editing, follow these steps:

  1. In the Tile Palette window, select the Select () tool in the toolbar.
  2. Select a tile in the Scene view, or click and drag to select a group of tiles.

You can then do the following:

  • To move a tile, select the Move () tool in the toolbar, then click and drag the tile to the new location.
  • To change the size of a tile, 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, edit the Scale properties in the Grid Selection Properties section.

When you select a tile with the Select tool, the Inspector window displays more properties and settings for editing the tile. For more information, refer to Grid selection properties reference.

Delete tiles

To delete a tile in the Scene view, use one of the following methods:

  • Select a tile with the Select tool, then press the Delete (macOS: Backspace) key.
  • Select the Paint with Active Brush tool, then hold the Shift key while clicking.
  • Select the Erase with Active Brush tool (), then click tiles. To erase multiple tiles at a time, select the Paint with Active Brush tool first, then click and drag an area on the tile palette that’s the size you need.

Add another tilemap to the grid

You can add multiple tilemaps to a grid.

To add a tilemap, in the Hierarchy window, right-click a grid GameObject then select 2D Object > Tilemap.

Important: If the new tilemap has a different type to the grid, Unity displays a warning dialog. Select Continue to change the Cell Layout property of the grid to match the type of the new tilemap. The warning dialog doesn’t appear if you use Unity in headless mode.

Additional resources

Create a tile palette
Save and reuse a tile selection with Brush Picks