Day 112: Animated Tile Maps

Objective: Create animated tile maps and paint on to the Tile Map.

To create animated tiles, we will need to grab an asset. This asset can’t be brought into Unity the traditional way. To start head over to:https://github.com/Unity-Technologies/2d-extras

This is 2D Extras git hub. Before downloading we will need to go to the correct tree for the right Unity version you are using. I am using 2019.4, so at the top left, where it says Master, click the drop down and select your version.

After you are on the right version, at the left hand side select Code → Download ZIP.

Extract it to a folder that you would like it to be in. After it extracted head into Unity and open Package Manager.

At the top left of our Package Manager, you will see a Plus sign with a little drop down arrow. Select that and click “Add package from disk…”.

Go into the folder that you just extracted and click on the package.json file and open.

Let it import. Once it is done, we will create our Animated Tile. To do that go to your project window and right click and go Create → 2D → Tiles → Animated Tile.

We are gonna create a animated water fall that has three different tiles. Let’s go ahead and create three animated tiles. Left side, center, and right side.

We will go over the Center Water fall in this article. With Center_Waterfall selected you will see the inspector change.

Now we have a place to put the sprite files. Before we continue on the Animated tile we need to splice our sprite sheet.

This let’s us know that we now have 30 frames for the animation. Back at our Animated tile we will set the number of animations to 30.

Now all we do is drag each frame of the animation into it’s respectful slot.

Before we move the Animated tiles into the Tile Palette, we need to set the speed of the animation. After the last frame, we have speed variables to add. We did 30 due to a frame a second.

Now with out Palette open, we will create a new palette and add in the animated tiles.

Now all that is left is to select the paint brush and select a tile and you can now paint the animated tile.

Thank you for reading and have a wonderful day!!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store