Search Unity

Transparency Sort Order Exceptions

Discussion in '2D' started by jfulmer, Sep 12, 2019 at 1:59 AM.

  1. jfulmer


    Sep 21, 2018
    Hi All,

    I'm working on a top down angled view game right now and I have a question regarding sort order. I have the settings set up to have the sort order axis on y, so objects higher will be drawn behind objects that are lower. However, I ran into a case where I have an object placed on a table. The objects y is higher than the tables so it is drawn behind, which is a behavior that I don't want. I thought about putting it on a higher layer, but then it will be drawn in front of the player when he/she walks by. Does anyone have any recommendations for me? Thank you very much
  2. Sam_Ooi


    Unity Technologies

    Mar 5, 2018
    Is your game an Isometric Tilemap based project? If it is, then using the Individual Tilemap Renderer Mode would help to gain the effect.

    If it isn't, then another 2D Sorting method you can try is to create Prefabs from the objects that are on the tables by making the table the root GameObject with the object as its child, then adding the Sorting Group component to the table. Then adjust the component settings, so they are rendered in the correct order. This sorting should be preserved when you place the Prefabs in your Scene, tho your project may be set-up differently.