Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to sort Tiles?

Discussion in '2D' started by wizenchiko, May 16, 2023.

  1. wizenchiko

    wizenchiko

    Joined:
    Dec 6, 2019
    Posts:
    10
    Hello. I have 2D (Top Down) game. I am using Transparency Sort Axis (0,1,0) to sort my sprites and it works perfectly but not for Tilemaps. I know what cause the problem but I dont know, how to solve it. Both Player and Tilemap have same sorting layer and order.

    Problem is that Tilemap behaves like a one big Sprite with Pivot in the middle.
    So that cause the problem, when I move to the bottom side of the map, I am always in the front of the walls. But when I am on Top on the map, I am always behind. So those tiles are not having individual sorting.

    preview.png


    How can I solve that ? Thank you.
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,315
    Go to the TilemapRenderer and change its mode from Chunk to Individual.
     
  3. wizenchiko

    wizenchiko

    Joined:
    Dec 6, 2019
    Posts:
    10
    Thank you very much.