Unwanted behaviour of Tilemap renderer with overflowing tiles.

So i have some custom tiles in my game that are larger than the size of the cell i only have a single tilemap for all tiles.

192303-2.png

So what happens is that the sorting of same type of tiles is happening as it should but when i have the two tiles above each other the sorting is not working correctly like

192304-1.png

I have tired all the sorting orders in tilemap renderer but could not fix it .

Any help is appreciated. Thanks.

Edit 1:I have all tiles in a single tilemap.

@JustAbhi create a new Tilemap for all the tiles that are not sorting properly (Called Tilemap2).
Then, make the sorting layer of “Tilemap2” lower than the sorting layer of the Original Tilemap

Found the answer to this.

I had my sprites saved as gif. Changed them to png that seemed to have solved it.

Still have some issues but it works correctly in a new project.