Suggestion: tile sorting that encompasses multiple tiles

As of the current Experimental Preview Build 3, the tile map tile sorting feature only seems to work as expected with “objects” that are one tile long in the y direction, not groups of tiles that are used to create larger “objects” in a scene. For example:

The tree is composed of multiple tiles using the tile map and its renderer is set to “individual.” Each of the tree’s tiles is sorted individually, breaking the illusion of the tree being a cohesive object that you can go “behind.”

One solution: the tile map should allow us to select a group of tiles and set the y sorting to depend on the bottom-most selected tile’s y threshold instead of every individual tile’s y threshold.

As it stands, I see three possible workarounds for tile “objects” that are taller than one tile and must be sorted, none of which are ideal:

Does the Unity team have an opinion on this?

EDIT 5/17/2017: Updated the GIF example and added more possible solutions.

Is this something that the 2D team is currently looking at?

I just looked at Preview 4 and the tile sorting is still the same. Now, this is not a bug, but I’m wondering what the Unity team thinks about this.

Is this seen as an issue? Should we simply be working with multiple tilemaps that have “tops” and “bottoms” (for example, the top of a tree is always in front of the player while the bottoms of trees are always behind the player)?

Updated GIF of the issue: Tilemap Y Sorting - Album on Imgur

If @Johaness_Reuben could take a look, I’d greatly appreciate it!

@AssembledVS You have highlighted the issue quite well. It is something we’ve been discussing and looking at various solutions - workflows to this. Trying to land on something that works well generally. Will update as soon as we have something.

1 Like

Thanks for the update and for working on this issue. This issue as well as 2D sorting always relying on the sprite’s center are two things that are holding up workflows for top-down games a bit (there are always workarounds, though). And you said that you’re also looking at 2D sorting, which is good to know. Tilemap sorting and 2D sorting should also work in tandem for a full solution to this.

@Johaness_Reuben Do you have an update on this? What kinds of solutions are you pursuing? Do you have a timeframe? Right now, I am making multiple tilemaps of different size tiles to work around this (very common objects that are 2 tiles high get tilemap x, 3 tiles high get tilemap y, etc.), and all others are gameobjects with pivot-based sorting that @CarterG81 explained here.

@Johaness_Reuben I am also wondering if you have an update on the individual sort order and a timeline. I am trying to make Indoor levels for a 2.5D game and I would like the custom sort axis for the level brush walls/ceiling (I made a custom one so they are 3 tiles high). Also the custom sort axis would save processing with doing that for my player and for future objects that are multiple tiles high.

Not much time has passed to solve this problem, forgive me for rushing you, but maybe there is already a solution?

Still having the same issue with this, are there any known work arounds?