Search code examples
unity-game-engine

Unity Tilemap Rendering doesn´t work fine. Why its Rendering tiles at first, altough they are behind a other Tile?


I'm creating a Unity project with a tilemap. On this tilemap I place objects via script, which sometimes extend over several tiles. Although it is a 2d game, I use a 3D grid to place tiles on top of each other on the same tilemap.

Here I have the problem that one tile is displayed before the other, even though it is behind it. Example: Position of the bottom tile of the latern: (0,0,0) Position of the middle tile of the latern: (0,1,-1) Position of the top tile of the latern: (0,2,-2)

Position of the left brown tile: (0,1,0) Position of the right brown tile: (1,1,0)

Position of the camera: (0,0,-10)

This is what the camera sees: Camera View

This is the scene view: Scene View

Here my Settings: Grid Settings Tilemap Settings

Can someone help me please? :D (I have the version 2021.3.0f1)

I would expect it to display the lantern completely above the brown tile. I have no idea why that could be...


Solution

  • I solved the problem. The cause of the error was a setting on the tilemap renderer. This must have the individual mode.