Under Tiling Rules, I’m looking for a way to add different output types to the Built-In rule tiles. I would like to create a
The current options are:
Single
Random
Animation
However I would like to add new output types - like Weighted Random - to this. Currently, the only way that this functionality -might- be possible is likely just by creating another custom rule tile for this explicit purpose. However, I have other Custom rule tiles that I would like to have this functionality on as well.
Does anyone have any insights on this? It would be a massive help, cheers.
The output mode is just an enum, so there is no clean way to extend it. In its defence, RuleTile’s were coded well before more flexible options like [SerializeReference] existed. Though to do so would probably need a new package built from the ground up.
In any case, they don’t mean edit the existing script, but make your own script in your own project that re-implements what you need, alongside modifying/extending whatever else you need. You can likely inherit from RuleTile and RuleTileEditor to reuse a lot of the implementation, or recode it entirely.