I have been struggling with an issue for a couple of days now trying to get depth sorting properly when using multiple layers in tiled.
My tiled map is set up as follows:
The sorting Layers I have in unity are:
Tiled to Unity sorting layers map as follows:
Background : Level 0
Background Noise : Level 0
Shadows : Level 0
Paths : Level 0
Tree Bases : Level 1
Tree Tops : Level 2
House Bases: Level 1
Objects ( crates and barrels ) : Level 1
House Roofs : Level 2
House Roof Items : Level 3
I have set the player sprite to be on sorting layer 1 along with the tree stumps, walls and floor objects.
When exporting to unity I'm ticking the check box for Use Depth Buffer as below:
Now the problem I am having is that when setting the layer to interact with on the Sprite Depth in map script I can only seem to make one layer work at a time.
eg, if I set it to interact with the tree bases layer, then the depth sorting works on there, but the character appears below the walls and the crates etc, but if I set the layer to interact with the objects layer then the character is always on top of the tree trunks rather than behind.
Interacting with tree layer
Interact with object layer
If I have one layer with the tree trunks, walls and objects (crates, barrels etc) and interact with this layer then it works as expected, but with only one layer in tiled I cant put the barrels in front of the house, or trees behind the house etc.
Is what I'm trying to do even possible with Tiled2Unity? or should I be doing something else?
Any pointers would be appreciated.