- Home /
2D Sorting Layer don't worn with new material
Hi, if you change the material of the Sprite Renderer, the Sorting Layer don't work anymore.
Unity are aware of that? Any solution?
Answer by BrightFyre · Jan 24, 2021 at 07:02 PM
I was just as confused as you are, I'll tell you what worked for me. I was using Unlit/ToonLitSprite, and all I had to do was change the setting "render queue" to transparent.
Answer by Julien-Lynge · Jul 12, 2015 at 07:57 PM
Hi @THretroGames,
Excellent question!
That is correct, and this is by design. The sorting layer actually modifies some material properties to tell the GPU what order to render things. If the new material doesn't have the same properties, this won't work. If you are willing to modify the material yourself, you can add control over the sorting order.
Check out this thread, discussing what you're seeing: http://forum.unity3d.com/threads/drawing-order-of-meshes-and-sprites.212006/