Hi!
Regarding Rule Tiles, if multiple tiles need to share the same rules, is it possible to adjust which one is selected in specific locations?
Example in the images below:
Hi!
Regarding Rule Tiles, if multiple tiles need to share the same rules, is it possible to adjust which one is selected in specific locations?
Example in the images below:
Generally you want to list more complex rules higher up than less complex rules.
Your second-listed rule should be first. Also, it should have an arrow to the up-right from the center.
Edit: now that I think about it a bit more, you might need to turn on Extend Neighbor and add an directly above that newly-added green arrow.
Rules are a bit hard to create/fix in the imagination so I hope that’s right. Give it a try.
Thank you.
While I did manage to somewhat solve the problem in the example, the issue remains in other areas of the rule tile which is not as easily solved, so the question remains.
Maybe I wasn’t super clear in the original question, is there a way to overwrite the rule of a specific placed tile outside of a simple reorder or a custom tile script without breaking it’s neighbors? Kind of like the Rule Override Tile but you can target where it applies.
Sorry for delay. If I understand correctly, I’ve done something similar by customizing/overriding the RuleTile script and adding an array of TileBase[ ] friendTiles. Neighboring tiles are normally evaluated by whether they are (a) this or (b) not this. These friendTiles get counted as this, so as a result they don’t appear to break the RuleTile when adjacent to one. However, I haven’t used the newest versions of Tilemap Extras so maybe there’s a more modern way of accomplishing the same. Hope that helps.
Thank you for taking the time trying to help!
Ended up finding suitable solution in the below code:
https://github.com/Unity-Technologies/2d-techdemos/blob/master/Assets/Tilemap/Rule%20Tiles/Rule%20Override%20Tile/ExampleSiblingRuleTile.cs