To create a tile palette, use one of the following approaches:
A tileset also automatically does the following:
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.
To create an empty tile palette, follow these steps:
Unity creates the following in the Project window:
You can also create a tile palette using the Tile Palette window. For more information, refer to Tile Palette window reference.
Follow these steps:
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.
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.
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.
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:
Follow these steps:
In the Project window, select the Tile Set Importer asset.
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.
Select the Add (+) button to add a texture source.
Open the Element dropdown.
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.
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.