Hello there.
I'm starting to work on a kind of randomly generated RPG, and I'm trying to figure the "how-to" for the world map. As I see with the Tilemap editor, I could use the scratchpad data's to save each room/area/coridor/parts datas of my world. I would then set some rooms data (size, doors, etc), have them assembled using some procedural stuff, then fill the tilemap with the tiles of each rooms.
My issue comes from how the API of tilemap works. Right now, the perfect object for this stuff would be the tk2dTilemapScratchpad object, but it is in the UnityEditor namespace and used as an Utility object to build the map in Unity. I can't use it in runtime.
I would have two approaches for this. Either I massacre the existing code to get the tk2dTilemapScratchpad as runtime data I would then save in some ScriptableObject, or I redo my own "Room Data" object, with the same kind of datas than the scratchpad (array of int for the tiles, sorted in several layers) and write a custom editor for those Room Data, using the tk2dTilemapRenderer and brush. In other word, rebuild the editor for a new kind of objects to edit. :/
So here is my demand : would it possible to add an option to save/load the content of a scratchpad as a file object (.asset or custom) we could then push inside the tilemap (Tilemap.SetTiles(int x, int y, ScratchpadData data)) to build it pieces by pieces at runtime?
Or is there some existing way I missed? :p