Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0a1
2018.2.0a1
2018.2.14f1
2018.3.0a1
2019.1.0a1
Issue ID
1103766
Regression
No
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
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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
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.