Tiled: What’s the best way to identify objects?

Hello, guys! I’m starting to work with Tiled and Tiled2Unity and I got a few basic questions:

  1. What’s the best way to deal with blocks in Unity? I’m creating types of ‘Block’ in tiled and that forces me to define and use “Layer” instead of “Tag”. I was thinking on using types so I can have property hits to see how many hits until it’s destroyed.

  2. Is there any way to simplify the hierarchy generated when importing to Unity? If I was doing this from scratch I would just create one object per block with all the components attached to a single object, but here I can see many different objects to represent one single block.

  3. Is there any way to automate the attachment of components such as script behaviors to the blocks without doing it manually every time I import the level updated from Tiled?

  4. Any other suggestions? I’m open to whatever you got in mind as far as I can keep using Tiled (I’m using this project as an excuse to understand it better).

Images attached:


Thank you so much for your time!

Replying to myself after a few days found solution for this, I guess the documentation was kind of hidden in the middle of a couple of posts.

Basically, you can create an “Editor” folder and implement a custom importer that runs before Tiled2Unity finishes.