Animated Terrain Tile - is this possible?

I’m using special tiles from the Unity 2d-extras project. I have Animated Tiles, and I have Terrain Tiles. I want to combine their properties to create Animated Terrain Tiles. Tiles that change their shape if there are matching adjacent tiles, but are also animated.

I would expect this to be a common usecase, but I can’t seem to find anything.

My idea was to modify the standard “AnimatedTile” class to store an array of TerrainTiles, instead of Sprites. Then, whenever the Sprite array is needed, get the Sprite array of the current TerrainTile, based on the current animation frame. Problem is, I’m not sure if it’s possible to check the current animation frame. The “TileAnimationData” class doesn’t seem to provide much info. I’m stumped, and need some help finding a way to do this.

Can anyone help me create an Animated Terrain Tile?

A combination of the Animated and Terrain Tile are not available in the 2d-extras repository, but you could combine the scripts together to make it work.

Alternatively, you could check out the Rule Tile and the implemented Ocean Tile in the 2d-techdemos repository. This should provide the functionality that you are looking for.

6174073--675820--upload_2020-8-6_11-0-8.png