2d-extras icon indicating copy to clipboard operation
2d-extras copied to clipboard

Possible to make rule brushes aware of other brushes?

Open nmearl opened this issue 4 years ago • 1 comments

I have a tile set that has several variations depending on the nature of the neighboring tile. However, I'm not sure of how to make the rule ~brush(es)~ tile(s) aware of this fact.

Is there a way to make a tile not just aware of the fact that there's a neighboring tile, but also what type of tile it is?

nmearl avatar Jan 10 '21 10:01 nmearl

I assume that what you mean as a rule brush is the Rule Tile?

If so, you could take a look at the example/s at https://github.com/Unity-Technologies/2d-techdemos/tree/master/Assets/Tilemap/Rule%20Tiles/Custom%20Rule%20Tile . This contains a custom Rule Tile script with adds or modifies Rules such that they consider whether the neighbour is the same type rather than the same Tile. You can create other custom Rules as well with the Custom Rule Tile script (https://github.com/Unity-Technologies/2d-extras/blob/master/Documentation~/CustomRulesForRuleTile.md).

Let us know if that helps or if what you need is something different!

ChuanXin-Unity avatar Jan 11 '21 02:01 ChuanXin-Unity