Version: Unity 6.4 Alpha (6000.4)
Language : English
Tilemaps in Unity
Working with tilemaps

Introduction to Unity’s tilemap system

Use the different components and features that make up Unity’s Tilemap system to create 2D grid-based projects.

This information covers the different kinds of tilemaps that Unity supports for different kinds of projects; how to prepare the tile assets; and how to ‘paint’ tiles onto tilemaps with the Tile Palette using different Brushes and tools.

Note: The 2D Tilemap Editor package is automatically installed with the Universal 2D Project template. If the package isn’t installed, refer to Package Manager.

Supported types of tilemaps

Use Unity’s Tilemap system to build the game world and levels of your project as you paint tiles onto a tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary
. Tilemaps are parented to a Grid, which acts as layout guide and determines the shape and size of the cells that make up the tilemap.

The default tilemap is a grid with rectangular cells, and you can choose two other specialized cell layouts: - Hexagonal tilemaps often used for strategy games. - Isometric tilemaps that allow you to create pseudo-depth and height to simulate a 3D effect.

Related components

A tile is a type of assetAny media or data that can be used in your game or project. An asset may come from a file created outside of Unity, such as a 3D Model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary
that displays a 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
where you place it on the tilemap. When you place a tile, you can also do the following:

  • Adjust how Unity renders the tiles by editing the properties in the Tilemap Renderer component
  • Include collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
    See in Glossary
    detection and calculations by including the Tilemap Collider 2D component.

Creating tiles and tile sets

Create tiles from the Asset menu or have Unity automatically generate tile assets from sprites brought into the Tile Palette. You can also use or create scriptable tiles, which can dynamically change what a tile looks based on scripted behaviors and conditions. Some possible behaviors are dynamically changing their displayed sprites based on neighboring sprites, playing animations, and other features.

You can create and use Tile Sets to populate a Tile Palette by importing textures that are automatically converted into tiles. Unity automatically updates these tiles both on the tilemap and in the Tile Palette when you edit the original textures. This is especially useful for creating placeholder tiles at the start of a project which you can update at any time, without needing to reimport or reslice textures for each individual tile.

Painting onto the tilemap with the Tile Palette and Brushes

To ‘paint’ onto tilemaps, you pick tiles from a Tile Palette and place them on the tilemap using a Brush. The Tile Palette has tools with different functions to help you select, paint, move, or remove tiles on the tilemap.

These same tools can also be used on the Tile Palette itself so that you can add, remove, or move the tiles on the palette as you like.

A Brush controls how tiles are placed when you ‘paint’ with it. For example, the Line Brush draws a line of the picked tile(s) onto the tilemap from a start point to an end point. Even more specialized Brushes can be created by scripting your own custom Brushes with custom behaviors. Refer to 2D Tilemap Extras for more examples and information.

Render Pipeline Compatibility

Tilemaps are supported by all render pipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
that support 2D projects.

Feature name Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP) Built-in Render Pipeline
Tilemaps Yes Yes No

Additional resources

Tilemaps in Unity
Working with tilemaps