SuperTiled2Unity icon indicating copy to clipboard operation
SuperTiled2Unity copied to clipboard

Runtime access to SuperTileset

Open AlexanderDahmen opened this issue 3 years ago • 1 comments

Hello,

I have a use case in which I need to access SuperTile instances. These will be placed onto a Tilemap procedurally.

To assign available tiles to the script, I intended to assign a SuperTileset to a public variable, but this is not possible since the SuperTileset class is an editor-only class.

What is the rationale of this class not being available at runtime, and could this be changes? Or are there other ways of accessing SuperTiles from a SuperTileset instance?

Thank you for this great tool, and have a nice day.

AlexanderDahmen avatar Aug 21 '21 23:08 AlexanderDahmen

For anyone else who comes across this problem like I did.

Just remove the .editor from the namespace in SuperTileSet and move the script out of the editor folder. There's no reason it needs to be there, and it's the only access you have to the SuperTiles in your project.

Regarding a simple use case, think something like Stardew Valley where you can till the ground and place tiles around your farm. Any sort of tilemap manipulation is blocked without access to the tiles themselves.

SayAllenthing avatar Mar 24 '23 23:03 SayAllenthing