Search Issue Tracker

By Design



Found in






Issue ID




Tiles overlap independently on the placement order when Tilemap cell's dimensions are lower than Tile's



To reproduce:
1. Open attached project ("TilePaletteShenanigans")
2. Select three tiles in Tile Palette window
3. Move the brush alongside the perimeter of already drawn tile line(see "BadOverlap" attached video)

Expected: Tiles overlap each other depending on the placement order
Actual: Tiles overlap independently on the placement order

Reproduced with: 2017.4.16f1, 2018.1.9f2, 2018.2.20f1, 2018.3.0f2, 2019.1.0a12

  1. Response avatar

    Resolution Note:

    The reason why this occurs is because the 3 Block Tiles each use 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 Block Sprites under Objects to Pack
    -In Project Settings/Editor, ensure that Sprite Packing is enabled (Always Enabled)
    -Enter PlayMode and observe the Tilemap

    If you are using Sprite Packer instead of Sprite Atlas, please ensure that all the different Textures used have the same Packing Tag and in Project Settings/Editor, ensure that Sprite Packing is enabled (Always Enabled (Legacy Sprite Packer)). You can view the packed Atlas under Window/2D/Sprite Packer to see if all the Sprites are on the same packed Texture.

    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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.