Forum rules - please read before posting.

SetTransparencySortAxis script not working in URP

Hello! I'm pretty new to Adventure Creator but I have been using Unity for a while.
I'm on Unity 2021.3.23f1 and AC v.1.77.3
I'm building my first game with AC and I have set up a 2D project with URP.
When I try to use the Axis sorting with URP, using the Script SetTransparencySortAxis that I found below the tutorial video on Youtube the sorting doesn't work:
Game Window: https://ibb.co/BgwJsqf
Main Camera and Script: https://ibb.co/pdzT1Q1
However if I remove the URP setting and try to set the Axis Transparency manually it does work perfectly:
Render Pipeline Removed: https://ibb.co/qm4ZZQf
Game Window: https://ibb.co/hsGDyRP
This is my Player Inspector: https://ibb.co/yRyJRR6
This is the Tree inspector: https://ibb.co/c297RMb
I made sure everything is on Default sorting layer at 0 and all the Pivots are on the bottom.
I also have a 2D Game camera (NavCam1) in the scene however the Script is attached on the MainCamera as per instructions.

Thank you in advance for your help.

Comments

  • Welcome to the community, @duckmadeofwood.

    I'm getting "502 Bad Gateway" errors when viewing your links - could you upload to imgur instead?

    If I recall, an alternate way to set the sort axis can be found in your URP 2D Renderer asset. What are your settings in its Inspector?

  • Hi Chris. I went on my Renderer2D.asset and in "General" I changed the Transparency Sort Mode from "Default" to "Custom Axis" with X:0 Y:1 Z:0. Now the Sort is correct AND I can use URP. Thank you very much.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.