Teach the rule tile how to arrange tiles

Hey there,

I’m currently experimenting with the unity-extras, especially with the tile map extensions (Animated Tile, Rule Tile, etc.)

At the moment I am dealing with the Rule Tiles. And threre is one problem which I cannot solve. As an illustration I have 7 tiles that together make a clean transition of a wall.

121561-walls.png

I would like to teach the rule tile how to arrange these tiles based on the height of the wall (in tiles)

1. with 3 or less tiles, use the first three or less tiles from the top
2. at 4 - 7 use the first four to seven from below
3. at 8+ use the whole column and  for the rest always the first tile

or something easier:

1. at 1-7 use the first 1-7 from the top
2. at 8+ use the entire column and for the rest always  the first tile

Does anyone of you know a way to implement that?

Looking forward for a reply

LG Kasko :wink:

You’d probably have to make your own ruletile, you should look into how they actually work and extend them, i’m pretty sure they’re just editor scripts. They supply a couple of examples which can be found here https://github.com/Unity-Technologies/2d-extras/tree/master/Assets/Tilemap/Tiles .