1

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

cgold
  • 4,075
  • 1
  • 12
  • 13
  • 1
    Are you sure the video timestamp is right? – Iggy Jul 20 '22 at 19:27
  • Corrected the link in the post, thanks! (1h16min:28) – cgold Jul 20 '22 at 19:31
  • 1
    Normally to the right of the expander arrow you'd get all your individual tile sprites. Open it in the sprite editor and use the tooling there to split it into multiple sprites (make sure sprite mode is "multiple" and that the unit size matches the pixel size of your tiles too) – Mathieu Guindon Jul 20 '22 at 22:32
  • Thanks, that's what I did as well (the image is a simpler example with only one tile). If I use 'sprite editor => slice/automatic' I get a lot of tiles, but the same issue: I cannot find a way of organizing these many tiles (>100) into groups after they are created automatically. – cgold Jul 20 '22 at 22:36
  • 1
    Ah, that's because your import has too many things! I'm learning this so take this with a grain of salt, but I solved that in my Mario clone by editing the entire-world PNG into "Grassland", "Snowland", "Castle", "Underground", etc. smaller & more specialized PNG images; characters don't belong there, I made a separate PNG for small Mario sprites, another for super Mario, another for flower-power Mario, one for the Goomba, another for Koopa, and so on. Then each import can go into its dedicated folder, each with all the sprites for a given object or world theme. – Mathieu Guindon Jul 20 '22 at 22:49
  • 1
    Then I made a "Grassland" tileset from the "Grassland" tiles, a "Snowland" tileset with an identical layout and ruletiles for the "Snowland" tiles, and so on, and now I can change an entire level from grassland to Snowland to underground with just the paint bucket/fill tool! – Mathieu Guindon Jul 20 '22 at 22:52
  • 1
    So in this case I'd edit the PNG to remove everything that isn't going to be used for a level (don't separate walls from ground tiles, or your ruletiles are going to be impossible to configure), and import separate PNGs per game object - like the torch sprites, all go together on their own. – Mathieu Guindon Jul 20 '22 at 22:55
  • Awesome, super helpful, I'd be happy to accept this as an answer. I also have found a "Sprite Library" that does allow some grouping, but maybe it's better to just organize into smaller sets beforehand. – cgold Jul 20 '22 at 23:08
  • Ah-ha! You might be onto something with this Sprite Library thing! – Mathieu Guindon Jul 20 '22 at 23:45

1 Answers1

1

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.

Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235