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

Isometric tilemap layering incorrectly

Discussion in '2D' started by BasharAlHotBod, Sep 18, 2021.

  1. BasharAlHotBod

    BasharAlHotBod

    Joined:
    Sep 30, 2020
    Posts:
    10
    Tiles layer properly in the tile palette inspector, but once drawn into the world, appear as if they're on two different layers. If I use all the same tile, they layer correctly, but once I mix and match tiles they appear layered/sorted incorrectly as shown on the right.

    They're all drawn onto the same tilemap and ordered from the top right. The grass that overhangs off the tops of the tiles is slightly different on each one, would that lead to this issue? Do tiles have to be pixel perfect copies in order to layer properly isometrically?

    Thanks in advance.

    layering.PNG
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,319
    Is this using chunked mode on the TilemapRenderer?

    That mode has the requirement that its textures need to come from the same spritesheet / atlas. If not, it will produce visual glitches much like that. You could try putting those sprites' textures into the same Sprite Atlas.
     
  3. BasharAlHotBod

    BasharAlHotBod

    Joined:
    Sep 30, 2020
    Posts:
    10
    Thanks, that seems to have fixed the issue in game, however in scene view the visual bug persists. It's making it hard to create maps in the editor. Any idea why that would be happening?

    Edit: turning on individual mode instead of chunk fixes the issue in scene view. So I suppose I'll just edit the scene with individual on then set it back to chunk for the performance boost.
     
    Last edited: Sep 19, 2021
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,319
    SpriteAtlas, iirc, doesn't do anything in scene until you enter Play and your individual sprites swapped out for the atlas one.
     
  5. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    246
    Yes! That's correct.