The Basics Of Tilemaps In Unity
Tilemaps are an easy way to layout a 2D space, using sets of images of fixed dimensions that can easily be painted across an area to build a level. Unity supports some basic tilemap features by default, but to get some of the more advanced features, you will have to enable preview packages in the Package Manager, and install the 2D Extras preview package.
To start using your tilemap you will need a palette.
Once you have your blank palette ready, you’ll need to add some tiling sprites to it. These assets are easy to find, as they are commonly used for all sorts of 2D games. Once you have your image imported, make sure and set its texture type as a Sprite, and set its sprite mode to multiple before opening up the Sprite Editor.
With that all set up, all that’s left to do is start painting tiles into your scene. You can multi-select tiles, drag boxes, or use flood fill to speed up your workflow. No matter how you end up populating your scene, tilemaps make keeping things aligned to a grid much easier and allow for a quick block out far faster than if you tried to place each sprite individually.