Creating/Saving Tile Shapes

Hello!

I need a way to easily create configurations of tiles, and assign data to each position. In the picture below, each box is a different shape. Imagine the black tile is (0, 0), and I apply some different effect for different color. I need to be able to use these configurations, (in my case, on a hex grid, but any thoughts are welcome).

So right now, I could manually input “At position (0, 1), do [affectA]. At position (0, 2) do [affectB]. etc…” and store it into a Dictionary<Position, DataOnPosition>, but I have to create and test, like, 100 of these shapes.

I’m imagining some sort of EditorWindow with a hex grid, and I can click on the tile visually and assign data to each tile. Then save and export that data in some way to use later.

Does anyone have thoughts on solutions to make and store these shapes?

-I’ve tried-
Inputting position/effect manually for each position, for each shape.
It works, but takes forever, is really easy to mistype and make a mistake. Will do if I can’t find another solution.

-I’ve looked into, but haven’t found a solution-
Scripting a custom editor, or custom editor window.

Exporting a spreadsheet

Pay if forward tax Anyone looking into hexgrids that find this should read this

It has everything you could possibly want to know… except how to save shapes in Unity.

Make the first three of them by hand, test and make sure 100% of everything else in your game idea is functional and operational.

Now write an editor window script to visually click and edit these things, and then you can make as many of these s you want visually!

A solution won’t be sitting there. The idea is you study examples so you can engineer a solution to your problem.

In place of an Editor, you could create a Tilemap prefab for each shape. Make sure you center it on (0,0) to make standardizing them easier. Assign data to each cell with tiles, either regular ones, or your own subtype that can contain extra info.

Then, at runtime, convert those prefabs into a better, lightweight data type (if desired) and unload the prefabs from memory.

It’s not perfect, but it will save you a LOT of time by not building a special Editor.