To create a platform game with tiles and tilemaps, follow these steps:
- Create a new Unity 2D project.
- Import the provided images.
- The tile sprites we're using for this recipe are 128 x 128 pixels in size. It's important to ensure that we set the pixels per unit to 128 so that our Sprite images will map to a Grid of 1 x 1 Unity units. Select all the sprites in the Project | DesertTilePack | Tile folder and in the Inspector window, set Pixels per Unit to 128:
Figure 6.45 – Import settings for DesertTilePack
- Display Tile Palette by going to Window | 2D | Tile Palette.
- In the Project window, create a new folder named Palettes (this is where you'll save your TilePalette assets).
- Click the Create New Palette button in Tile Palette and create a new Tile Palette named DesertPalette:
Figure 6.46 – Creating a new Tile Palette named DesertPalette
- In the Project window, create a new...