Objective: Create our environment using several Tilemaps!
Thanks to our last tutorial I believe we have enough to paint the background now using different Tilemaps. Remember Tilemaps are basically Layers. The first layer we want to add would be the midground.
To begin, right click the grid object in the Hierarchy > 2D Objects > Tilemap
For organizational purposes I renamed my new Tilemap as “Midground_Tilemap”
If you have not painted your ground Tilemap yet, make sure the active Tilemap on the Tile Palette window is set to the correct Tilemap.
Paint your ground Tilemap.
With the ground finished we can move on to the midground and begin painting. I’ll be using the caverns I created in the last tutorial. Select the midround_Tilemap and Select the tiles I need.
Let’s add one more cavern.
You can see the cavern is laying over our ground Tilemap. To fix this we need to put our Tilemaps in order. The Tilemap with the higher number on the “Order in Layer” will be displayed on top. In the inspector lets set our ground Tilemap higher then the midground Tilemap.
At this point we can paint in the blank are by selecting a single tile and brush in the areas. If you need to see behind the ground Tilemap select the Focus On in the bottom right corner of the scene view and select Tilemap.
Finished painting it in and marvel at your good work!
Let’s create another Tilemap for the far-ground and fill in the cavern holes.
Select the midground and set the Order in Layer and set to 1. Now by default the far-ground Tilemap will be behind the midground.
Make the active Tilemap the far-ground Tilemap and I will use another cavern and pain them into the cavern holes.
Now select one of the full color tiles to paint in the blank area and fill it in.
After painting the far-ground We have successfully painted ourselves an awesome looking environment using Multiple Tilemaps and Tile Palettes. Don’t be afraid to experiment with your Tilemaps and I’ll see you in the next tutorial!