Version: 2018.2 (switch to 2018.1 or 2017.4)
Creating Tiles
Tilemap Palette
Other Versions

Creating Tilemaps

From the 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
menu, move to 2D ObjectA 2D GameObject such as a tilemap or sprite. More info
See in Glossary
and select TilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
See in Glossary
.

This creates a new GameObject with a child GameObject 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
. The GameObject is called Grid. The Grid GameObject determines the layout of child Tilemaps.

The child GameObject is called Tilemap. It is comprised of a Tilemap componentA functional part of a GameObject. A GameObject can contain any number of components. Unity has many built-in components, and you can create your own by writing scripts that inherit from MonoBehaviour. More info
See in Glossary
and Tilemap Renderer component. The Tilemap GameObject is where Tiles are painted on.

To create additional Tilemaps to be used as “layers”, select the Grid GameObject or the Tilemap GameObject, and select GameObject > 2D Object > Tilemaps in the menu or right-click on the selected GameObject and click on 2D Object > Tilemap.

A new GameObject called Tilemap (1) is added into the hierarchy of the selected GameObject. You can paint Tiles on this new GameObject as well.

Adjusting the Grid for Tilemaps

Select the Grid GameObject. Adjust the values in the Grid component in the inspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary
.

Property Function
Cell Size Size of each cell in the Grid
Cell Gap Size of the Gap between each cell in the Grid
Cell Swizzle Swizzles the cell positions to other axes. For Example. In XZY mode, the Y and Z coordinates are swapped, so an input Y coordinate maps to Z instead and vice versa.

Changes in the Grid affect all child Layer GameObjects with the Tilemap, Tilemap Renderer and Tilemap ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
2D components.


Did you find this page useful? Please give it a rating:

Creating Tiles
Tilemap Palette