Hey y’all. Here’s a fix at least for 2019.2.6f1. I’m sure it was available long before this. Just look at your material in debug view. There might be a “custom render queue” field. Note: this isn’t your render queue + custom render queue; it’s a complete override value.
Try it with the Unity Standard shader, not the UI shader. Then switch back to Normal view. Does it still remain the custom render queue? I’m still using Unity 2017 so I can’t test it.
gosh I seriously hate unity sometimes. They ignore serious requests like this one, for years and years. Like WTF. And if there’s a good reason it’s that way, at least tell us in forums like this.
I have the same issue. Yes, the Blend Mode overrides it. When we need a specific render queue value, we cannot achieve it with Standard Shader. It would be awesome to have a “Custom” dropdown field selection, in which we can then set a custom render queue value that will indeed be saved.
This fix will (a) expose the render queue in the Standard Shader UI and (b) allow to control it as long as it’s within the correct range for the selected blend mode.
This is a super annoying limitation of the standard shader but in the meantime, here’s a sloppy workaround. Tested on 2019.3.9f
using UnityEngine;
public class ChangeRenderQueue : MonoBehaviour
{
public int renderQueue = 1997;
public MeshRenderer mr;
// workaround for simply changing the render queue of a material because unity is broke
void Start()
{
mr.sharedMaterial.renderQueue = renderQueue;
}
}
As a workaround you can save a preset in the material inspector, then exit debug mode (so Custom Render Queue is rewritten by Blend Mode) and then load the preset. The value set in debug mode is recovered.
Just spent entirely way too long on this problem once I upgraded my project.
In Unity 2021.3 it’ll be overridden no matter what, so set Sorting Priority under Advanced Options on your material – that will adjust the Queue by the value you input.
I was able to fix this by changing the StandardParticlesShaderGUI and forcing it to only change the renderqueue when it was under the correct one for that blend mode. In my case I only want to be able to set it to more than 3000(Transparent) so I did this:
if (material.renderQueue < (int)UnityEngine.Rendering.RenderQueue.Transparent)
material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;