Use 2D Tilemap Extras to create maps with animated autotiles

Page update date :
Page creation date :

Verification environment

Windows
  • Windows 11
Unity Editor
  • 2021.3.3f1
Input System Package
  • 1.3.0

Prerequisites for this tip

The following settings have been made in advance as a premise for the description of this tip.

What are the prerequisites for this tip?

About borrowing map materials

It is borrowed from the following site.

About creating animated autotiles

You can create animated auto-tiles using the previous tips "Create maps with auto-tiles using 2D Tilemap Extras" and "Create animated tiles with 2D Tilemap Extras". Therefore, I would like to briefly describe the location of the same procedure as before in this Tip and explain in detail the operations specific to this Tip.

Prepare MapTips for animated autotiles

In the previous Tips , we prepared the following image as a maptip for autotiles.

To animate with this format of maptips for autotiles, prepare an image in the following format.

The vertical is arranged horizontally as many as the number of animations by 5 squares as in the past.

However, as explained in the previous tips , this format is used in the WOLF RPG Editor, so it cannot be used as a standard Unity feature.

Therefore, it is necessary to deploy MapChips, but the following sites mentioned earlier do not support animated auto tiles.

So I made a program so that I could deploy an animated auto tile for this time. I have prepared two pages, but both will have the same result, so please use whichever you like.

If you drop an animated auto tile into the frame, it will be divided into as many animations, so click to download each.

Set up animated autotiles in the Unity Editor

Once you have the MapChips, create a project and add the MapChips you created to the project.

Split the maptip. This is the same procedure as a non-animated autotile maptip. This time, it is divided into three for animation, but since it is necessary to set all three, it is OK to set them all together with three selected.

However, the Sprite Editor can only be set to one file at a time, so slice them individually.

Adding a Rule Tile

Add a Rule Tile. This procedure is the same as that for a regular autotile maptip.

Name it Waterway AutoTile.

Set Default Sprite in the inspector.

Next, drop the "first maptip" together in the border.

Up to this point, it is the same as setting up a normal auto tile. This is where the animation settings begin.

Each maptip has an item called "Output", so change this to "Animation".

Then, items are added as shown in the figure below. Enter the number you want to animate in the "Size" field. This time, we will use 3 sheets, so enter "3".

Then, there are now three MapChip specified items. You will set a maptip to be animated here.

You can drop MapTips from the project or choose from the selection. When choosing, I think the number display is easier to understand.

Set.

Set the third one in the same way.

This completes the setup for one tile. Set this setting for the remaining 46 tiles.

Add to tile palette

From here, the procedure is the same as before. If there is no tile palette tab, display it from "Window -> 2D -> Tile Palette" in the menu.

Drop a Rule Tile onto the tile palette.

MapTips (animated auto tiles) placement

Add a tilemap to the hierarchy.

Place a MapTip on the tilemap.

You can't see the animation in the editor, so after placing it, run it and check if it animates.

By default, it switches every 1 second, so it is OK if it is animated. Changing the animation time was discussed in the previous Tips .

Setting up animated auto tiles is quite difficult, Once you set it up, all you have to do is place the map chips and they will do animations, so I think map production will be accelerated.