Introduction into tilemaps in Unity

Daniel Kirwan
2 min readAug 23, 2021

--

Objective: A quick run through how to create a tilemap from a spritesheet in Unity

Before I begin with the tile palette window you will first need to create a project in Unity and select the 2D option. This will install all the 2D related packages that come with Unity.

Once the project is created you will need a tile set or sprite sheet that you want to use for your level.

I have used some sprites sheets provided by game dev HQ, you can find some great 2D assets by Kenney here. Once your sprite sheets have been imported, you will need to make sure that they’re in the correct format for Unity.

Click on the sprite and in the inspector you will see the texture type option, make sure that it is Sprite (2D and UI), if you change to this make sure that you click apply before doing anything else.

You will need to take note from the designer of the sprite sheet as to the sprite sizes. In my case, most of the art I’m using is 128x128.

To create the tile map, we first need to create a new palette.

In the tile palette window click create new and select a save folder. You should have an empty tile palette. Now, click back on the sprite sheet and change the sprite mode from single to multiple.

Now, click on the sprite editor, and click the slice option. The next step is to select slice by cell size, this is where you enter you art size. Then click slice and apply the changes. The last part is to change the pixel per unit size to the same as the cell size.

Once the above is done, you will have a new sprite sheet that is ready to be used as a tilemap.

Now, drag the sprite sheet into the empty tile palette and you will see the tiles that are now available to you to paint your scene.

--

--

Daniel Kirwan
Daniel Kirwan

No responses yet