How can I organize tiles in a tileset?

378 views Asked by At

I am trying to follow the tutorial for a dungeon RPG, which involves creating a tileset.

As part of this (bookmark to exact time in video (edit: thanks, corrected)) in the video it's possible to move around tiles into separate folders. I am trying to re-create this on Unity 2022.2.0.a14.2406, and I don't seem to be able to do this: Whenever I move around tiles (from a tileset) to other folders in my assets, I end up moving the whole tileset (see image below, with the left-arrow linking to the tileset). This of course prevents me from splitting up tiles, e.g. into categories like players/walls/etc.

enter image description here

How would you do this? I also tried using tags, but they seem to have the same issue - they get applied to all tiles in a tileset.

Edit: Example with multiple tiles (showing the first few) extracted via 'sprite editor => slice/automatic'. It's 256 tiles, so to use them it'd important to have some way to group these tiles.

enter image description here

1

There are 1 answers

0
Mathieu Guindon On BEST ANSWER

I bumped into a similar situation, and solved it rather naively by firing up Paint.NET to edit the gigantic sprite sheets I had found online into smaller similar ones for the different types of terrains, and making a distinct PNG for each character and game object.

Good naming is critical: use a short but descriptive name for each PNG, so it imports and breaks down into say Torch_0, Torch_1, etc. and Castle1_0, Castle1_1, BlueBlobBaddy_0, etc.; have all the sprites needed for a given terrain type in the same import file, import them into dedicated folders/subfolders, then splice them into tiles.

It's honestly quite a lot of work, but it's well worth it in the end.

I'm hoping this post will honor the age-old rule "if you want to learn how to do something, post the wrong way to go about it online" and will prompt a better, not-so-naive approach to this problem which I presume everyone working with 2D tilesets in Unity has encountered.