Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Hexagonal tilemaps sorting order

Discussion in '2D' started by drHogan, Nov 25, 2018.

  1. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Ok, I've seen several posts and also a possibly-related issue in the tracker (closed and supposedly fixed), but I didn't seem to find a proper answer or certainty about existing bugs (even though it looks like it is).

    I did give a try to hexagonal maps, and beside quite a few things that look unclear to me (starting with the axes system), I can't seem to find a way to sort them logically.



    I tried all of them Top/bottom/left/right, but non seems to be consistent logically. Is it still a fully bugged feature or am I possibly doing something wrong?
    I did store the tiles all in a single sprite atlas as for some instructions, tried various combinations of settins, but none seems to work, and all seems to have very strange behaviors.
    How usable are hexagon tilemaps right now ? (we plan to start a small project based on them, but we would only in case they are not fully bugged)

    Thanks in advance,
    H
     
  2. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Ok, my experiments continue and I can't believe that there is so little online. Either nobody is using the hex tilemaps (not sure if the problem happens also on the rect ones) or nobody is talking about it. But for me it's being quite blocking. The solution suggested for the rect tilemaps don't work, beside the Individual mode suggested disappeared from the editor too.

    So, I have a single tile, this one


    I set it up as a tile, sprite size, etc all set. To see if it was related I tried both having it in an atlas (alone) and as a single sprite. Didn't make any difference.
    I did change the transparency order in Project Settings > Graphics , nothing happened no matter the changes i made.

    So here's what i get by changing the sorting order of the tilemap.

    BottomLeft



    BottomRight



    Top Left


    Top Right


    Maybe I do expect something wrong by mistake, but it looks to me that only TopLeft does what it should, right? Also, while playing with some other tileset before, I had some very inconsistent results, as for example a 5-tiles tileset only working for 4 out of 5 tiles. With the 5 tile ALWAYS going on top of all the others.

    Is there any explaination I am missing about all this? Is anyone using the Hex tilemaps successfully?
    I admit not being familiar with tilemaps (but I am with the whole sprites and 2D workflow), but it feels really strange what I am getting here.

    Thanks in advance for your time if anyone has any tip or answer!
    Cheer,
    H
     
  3. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    (Ah, I did try it both on 2018.2.16 and 2018.2.17)
     
  4. Sebille

    Sebille

    Unity Technologies

    Joined:
    Jul 23, 2018
    Posts:
    5
    Hiya!

    So the issue here is exactly the same as the one for Isometric Tilemaps (and is fixed in the same way). It has to do with the Transparency Sort Axis, defined either at project level within Project Settings, or per-camera. Please take a look at this thread for more details - I have found the solution for Hexagonal Tilemaps to be identical in this case: Isometric Tilemap Sorting issues

    If you are having further issues, it might be worth taking a look at the full thread in case one of the things listed there can help you out. Otherwise, please let us know if you run into any more problems.

    Cheers!
     
    cirocontinisio and drHogan like this.
  5. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hi @Sebille , thanks for answering! I did try to use the same approach but apparently unsuccessfully. I will go again through that same thread, but what seemed to block me, was the lack of "Individual" among the tilemap rendering settings that seemed to be important to solve the issue in the other threat, but is now missing from the editor.

    I will try again soon and let you know if I have more success with it!
     
  6. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hi @Sebille
    I did try all the changes suggested in that thread and also checked what they did below (i didn't try that much with custom brushes, but i am still fairly ignorant in that topic) but they seem to have no impact on the results. Changing the Transparency Sort Axis doesn't seem to change anyhow the rendering order or my tiles. (it's a single tile, I tried both having it as a free sprite and as unique element of an atlas).

    This is the "best" result I get with the suggested rendering settings (0,1,0) and a top right sorting order (one tile is separate from the others to see how it's structured). Am I expecting something wrong? My idea would be that all those "side" parts should get automatically hidden as per Max's tiles in the other thread, or should they me structured as completely separate elements?



    Cheers,
    H
     
    jeanpoolay likes this.
  7. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Ok, it looks like that by using 2018.3 the sorting issue is solved. I did think that the Hexagonal tilemaps were being updated also in 2018.2 but ti doesn't look like that.
     
    jeanpoolay likes this.