In the 2D experimental builds featuring the tilemap, there used to be a “rendering mode” with two rendering options: individual and chunk. Individual sorted each tile and chunk sorted the entire tilemap. It seems like this feature was removed in 2017.2, and probably even in the beta build, which essentially means that all tilemaps are now like “chunk.”
Is this something that is being looked at to be re-implemented? One of the issues with the previous individual tile sorting method was that it was impossible for a single tilemap to sort “chunks” of tiles that created whole objects like trees, etc. This would be the result, as each tile was sorted. What this meant was that only “objects” that were one tile high could be sorted, like a small bush that is one tile high.
But at least some workarounds were possible - like having multiple tilemaps for different-sized “objects,” like 1x3 fences, 1x10 trees, etc., for “objects” that were common enough in which this made sense (each tilemap would have tile sizes like 1x3, 1x10, etc.).
For anything larger than one tile with varied sorting I’ve been creating a prefab made of sprites, with a SortingGroup component on the root. The 2D extras repo has a Prefab brush and GameObject brush for fast placement of these in the scene on the grid.
As long as they are children of a grid component they will align to the grid when you move them around, which is an easy way to align the sprites and create the prefab.
It looks like there hasn’t been any updates on this for months.
Jeffreyschoch’s suggestion is a good one. I learned about pivot-based sorting with an empty root object with a SortingGroup component from this post: [OFFICIAL] 2D Sorting feedback - #43 by CarterG81
But my biggest issue is the fact that each sortable object needs to be its own game object, and two game objects in fact (the parent with the SortingGroup and the child sprite object). And the fact that I’m dividing my environmental assets like this:
tilesets - ground and walls; tiles, not game objects (except for the tile layer)
doodads - furniture, bushes, large rocks; game objects, not tiles
interactables - chests that can be opened, hedges that can be cut down; game objects, not tiles
Both the doodads and interactables are all sortable so they must be their own game objects.
Is the Unity 2D team looking at making individual tiles and tile groupings (for example, a 1x4 tile tree) sortable? (A tile grouping would be a selection of a number of tiles and the sorting would be based on whatever the sorting method is used, like y-sorting for top-down games. So in this case, 4 tiles that constitute a “tree” would be sorted by the bottom-most tile as the y threshold.)