Unity-Technologies / 2d-extras

Fun 2D Stuff that we'd like to share!
Other
1.56k stars 344 forks source link

Override tile or advanced override not doing it at all. #190

Open jjeepjoe opened 4 years ago

jjeepjoe commented 4 years ago

I have loaded the 2D-tech Demo and have built a sample project that I want to use the Rule override tile, but it only displays the default tile, not the desired override. Here is what I have done step by step: made a functioning Rule, without anything special just tiles in single positions, next I made the override object > added the rule i created and I get the list on the left > I make only a single change to right of a tile > even the display at the bottom shows the replacement tile in the group. Then I drag the Override object into the pallet > but when I paint it only shows the default > and the rule tiles do not even recognize the difference. I have tested just loading the scripts into my project, I have tried adding the preview package to my project too > I get the same results, what am I missing? I will try loading my tiles into the demo project to see the results.

ChuanXin-Unity commented 4 years ago

Could you share some screenshots of the results you are seeing, and also screenshots of the inspector of your RuleTile and RuleOverrideTile? That would be helpful in identifying the issuue you are facing, thanks!

jjeepjoe commented 4 years ago

Ok, i dug and dug and dug, to find the SiblingRule Tile script, once I implemented it in my test I was able to get the override to work. I don't understand why a tile can not override another tile , but the sibling Rule is the winner. The sibling is not included with the extras.

ChuanXin-Unity commented 4 years ago

I am glad that example helped!

The SiblingRule Tile is an example of a custom Rule Tile where you can override the Rules or add your own Rules for Rule Tile matching. Since it is an example implementation, it is in 2d-techdemos rather than in the 2d-extras. Feel free to customize Rules for your needs!

jjeepjoe commented 4 years ago

Just took this part time designer a little while to get to the finish line, my only question, is why does the documentation not follow the solution? The Advanced Override looks like a good replacement, for the end result, but it also would not change of the tiles in a rule.

ChuanXin-Unity commented 4 years ago

Yes, the documentation is out of date, that's on us, sorry about that!

We hope to get it sorted out when we are able to put this repository as a package on the Unity Package Manager.

jjeepjoe commented 4 years ago

I support the addition, count my vote!