Version: Unity 6.4 (6000.4)
Language : English
Introduction to tilemaps
Paint tiles into the scene

Create a tile palette

To create a tile palette, use one of the following approaches:

  • Create an empty tile palette, then manually drag spritesA 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
    into it to create tiles.
  • Create a tileset, which automatically creates tiles from a texture and its sprites.

A tileset also automatically does the following:

  • Updates the tile palette if the source texture changes.
  • Creates a combined sprite atlasGraphics: A utility that packs several sprite textures tightly together within a single texture known as an atlas. More info. 2D: A texture that is composed of several smaller textures. Also referred to as a texture atlas, image sprite, sprite sheet or packed texture. More info.
    See in Glossary
    texture from the source textures.

Use a tileset if your tiles correlate directly with the textures you use, for example if you import a spritesheet. You can also use a tileset to create placeholder tiles with a texture you can update at any time, without needing to reimport or reslice.

Create an empty tile palette

To create an empty tile palette, follow these steps:

  1. Make sure the 2D Sprite package is installed in your project. For more information, refer to set up your project for 2D games.
  2. From the main menu, select Assets > Create > 2D > Tile Palette.
  3. Select a tilemapA GameObject that allows you to quickly create 2D levels using tiles and a grid overlay. More info
    See in Glossary
    type, which determines the shape of the tiles in the tile palette. The default tilemap type is Rectangular.

Unity creates the following in the Project window:

  • A tile palette asset with the name you specified.
  • A child asset that contains the settings for the palette.

You can also create a tile palette using the Tile Palette window. For more information, refer to Tile Palette window reference.

Add tiles to a tile palette

Follow these steps:

  1. From the main menu, select Window > 2D > Tile Palette to open the Tile Palette window.

    If you have multiple tile palettes, set Active Palette () to the tile palette you want to add tiles to.

  2. Drag a sprite asset () or a texture from the Project window to the Tile Palette window.

    If you drag a texture with a Sprite Mode of Multiple, Unity creates a tile for each child sprite. For more information, refer to Import a sprite or spritesheet.

  3. Unity converts the sprite to a tile asset (). In the folder dialog that appears, select a location to save the converted tile asset.

The sprite now appears as a tile in the Project window and the Tile Palette window.

Note: The tile asset isn’t connected to the source sprite or texture. If you update the source sprite or texture, the tile palette doesn’t change.

Create a tileset

To create a tileset, from the main menu, select Assets > Create > 2D > Tile Palette > New Tile Set. Unity creates the following in the Project window:

  • A Tile Set Importer asset.
  • A child asset that contains the settings for the palette.
  • A child sprite atlas.

Create tiles from a texture

Follow these steps:

  1. In the Project window, select the Tile Set Importer asset.

  2. 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, open the Texture Sources dropdown.

  3. Select the Add (+) button to add a texture source.

  4. Open the Element dropdown.

  5. Drag a texture from the Project window into the Texture field, or select the picker ().

    If you drag a texture with a Sprite Mode of Multiple, Unity creates a tile for each child sprite. For more information, refer to Import a sprite or spritesheet.

  6. Select Apply.

Unity converts the texture to tile assets () and adds them as children of the tileset in the Project window.

To check the tiles Unity creates, open the Tile Palette window, then set Active Palette () to the tileset.

If you change the source texture, the tiles in a tileset automatically update to match the changes.

Additional resources

Introduction to tilemaps
Paint tiles into the scene