Unity’s Tilemap System

Gabriel Perez
2 min readJan 3, 2022

A short intro to Tilemap and its components.

A tilemap is a system that uses a grid and stores the data of a tile sprite to create 2D levels. When tiles are placed onto the grid, other related components such as the Tilemap Renderer and the Tilemap Collider 2D are required.

When creating a tilemap, the Tilemap and its required components are parented to the Grid component.

The Grid component helps guide and align GameObjects onto a selected layout. Here, you can adjust the cell size, its gap between the cells, its layout, and cell swizzle, which manipulates the cell coordinates based on the direction needed.

The Tilemap component stores and handles the information of a tile sprite. With the Tile Palette, you can create, modify, and pick tiles for painting onto a Tilemap.

Think of a Tilemap game object as a layer that is specific to a set of tiles. A ground Tilemap layer will be needed for the ground tileset. A wall Tilemap layer could be needed if making a top-down RPG. A foreground and a background Tilemap layer are needed to make the environment have depth!

Once you have a set of tiles and configured them, you can use them in the Tile Palette so that you can pick tiles to paint on Tilemaps!

If you are making a 2D game, use the Tilemap system!

For more information on the many features of a Tilemap and its components, visit Unity’s Documentation of them here.

Gabriel

--

--

Gabriel Perez

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.