Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question HELP!! How do I fix the layering on my tilemap?

Discussion in '2D' started by evtran4, Jan 10, 2023.

  1. evtran4

    evtran4

    Joined:
    Jan 10, 2023
    Posts:
    2
    upload_2023-1-10_10-42-38.png

    How do I get my tiles to properly layer? The lower plants should lay over the ones above so it looks right.
     
  2. flasker

    flasker

    Joined:
    Aug 5, 2022
    Posts:
    193
    change transparency sort axis, change pivot to bottom of tile
     
  3. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    253
    Yeah like what was suggested above, try the Custom Axis sort mode. Select this mode to sort Renderers based on their distance along the custom axis you set in the Project settings/2D Renderer Data. In this case, the Y-axis. This is commonly used in projects with Isometric Tilemaps to sort and render the Tile Sprites correctly on the Tilemap.

    May I know which Editor version you are on? In older versions, you can either find the Transparency Sort Mode/Axis in the Project Settings. Edit > Project Settings > Graphics > Camera Settings.

    Custom Sort Axis Old.png


    Else, in newer versions, this can be found in the 2D Renderer Data Inspector.

    Custom Sort Axis New.png

    Here's a short tutorial I found on YouTube on Unity Sprite Layering - Y Sorting, Sorting Layer and Order in Layer.



    There's also more details about 2D Sorting in our documentation.
     
    contactjakemb likes this.
  4. evtran4

    evtran4

    Joined:
    Jan 10, 2023
    Posts:
    2
    fixed it. It was actually just changing the sort order on the tilemap, not the transparency sort axis. Thanks though!
     
  5. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    253
    Glad it's fixed! Thanks for letting us know. Have fun painting!