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

Why can I not sort by y only with the tilemap renderer?

Discussion in '2D' started by dakasha, Jul 18, 2018.

  1. dakasha

    dakasha

    Joined:
    Nov 20, 2010
    Posts:
    29
  2. dakasha

    dakasha

    Joined:
    Nov 20, 2010
    Posts:
    29
    As it stands, I can only get some kind of variation of this (useless) sorting, when one would very obviously expect y sorting to be a possibility
     

    Attached Files:

  3. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    There has always been the Transparency Sort Axis which you can use to create a custom sorting, but sorting happens per-renderer, meaning if you're using TilemapRenderer, the individual tiles won't be affected by it. So one option is to use a SpriteRenderer per tile while sharing materials.

    To get the individual tiles of a tile map to sort, you have to use those sorting modes, which are actually quite useful.

    TopLeft and TopRight both sort from the top down. How do you expect your tiles to sort when you have them overlapping on the X axis?


    Additionally, you can update to 2018.2 and test the new 2D Hexagon Tilemap
    https://blogs.unity3d.com/2018/07/10/2018-2-is-now-available/