Rule Tile custom Output types

Hi,

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

image

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.

You could create your own custom RuleTile based on the original. Editing the script to have another option there shouldn’t too hard.

The hard part is this also requires customizing the RuleTileEditor, which is a behemoth.

Thanks for the reply!

I tried modifying the original RuleTile script but it keeps erasing my edits, so I assume I’m not supposed to do that… :stuck_out_tongue:

I’m not too sure about how I would go about it another way.

In general, it would be nice if there were a cleaner way to add new outputs.

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.

Ah, I see! I may have to do it myself as a side project one day. Thanks!