Search Issue Tracker
By Design
Votes
1
Found in
2017.3.1f1
Issue ID
1014358
Regression
No
TilemapRenderer sorting order is not consistent with different images
How to reproduce:
1. Open given Unity project
2. Enter "Woods Level 2" scene
3. Open the Tile Palette
4. Select "Bush" tile in the Tile Palette (bottom left)
5. Draw in the scene
Expected result: All drawn tiles should be sorted equally but not randomly
Actual result: Drawn tiles are sorted randomly
Reproducible with:2018.2.0a2, 2018.1.0b11, 2017.3.2f1, 2017.2.2p1
Note:
Cannot test on 2018.2.0a3 and newer versions because of tile palette bug
Comments (3)
-
wladyslaw
Sep 28, 2018 16:24
POSSIBLE SOLUTION
Seems like this can be easily helped by using a Sprite Atlas. See the answer to the linked question: https://gamedev.stackexchange.com/questions/154980/unity-order-issue-with-tilemaprenderer-render -
wladyslaw
Sep 28, 2018 16:24
POSSIBLE SOLUTION
Seems like this can be easily helped by using a Sprite Atlas. See the answer to the linked question: https://gamedev.stackexchange.com/questions/154980/unity-order-issue-with-tilemaprenderer-render -
wladyslaw
Aug 22, 2018 12:48
Could be related to the issue described here: https://gamedev.stackexchange.com/questions/154980/unity-order-issue-with-tilemaprenderer-render
There is some interesting info about Draw Dynamic event.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- ACES Tonemapping causes banding artifacts and negative values in ColorGradingLUT when HDR is enabled and "High Dynamic Range" Grading mode is selected while Android Platform is used
- Android Player freezes when an Audio Source is playing and an incoming call is picked up and then hung up and the Audio Source is started again
- Green success icon is poorly visible in the light Unity theme
- Incorrect input into the Input Field when using Microsoft IME Japanese
- Multiplayer role "ClientAndServer" is displayed without the spaces in the "Play Mode Scenarios" window
Resolution Note (2018.3.X):
The reason why this occurs is because the Bush Tile is made up of 3 Sprites that come from different Textures. The default rendering in TilemapRenderer prioritizes rendering Sprites in the same Textures and batching them together to reduce the number of Draw Calls, before sorting the Tiles. This can be verified by looking at the Unity Frame Debugger to see how the Sprites are drawn.
To help with this issue, the Sprites used in the Tilemap can be atlassed to a single Texture so the sorting can happen. To do this:
-Create a Sprite Atlas in the Project Window
-Select the Sprite Atlas asset
-In the Sprite Atlas inspector, add the Bush Sprites under Objects to Pack
-In Project Settings/Editor, ensure that Sprite Packing is enabled (Always Enabled)
-Enter PlayMode and observe the BushTop Tilemap
Alternatively, with the soon to be released 2018.3 version of Unity, enabling Individual mode rendering for the TilemapRenderer would allow for individual sorting and rendering of the Sprites instead of batching them up together statically.