How do i change the Render Queue ?

I was having problems whith the rendering order of two transparent materials and i was advised to set the render queue of the object in question (a spaceship shield) to Transparent+1, since they are both probably currently set to Transparent. HOW DO I MAKE THIS MODIFICATION ???

(apparently it has to do with the Unity ShaderLab, and i dont know anything about it).

Here is the inicial question: How do i correct the rendering order of two transparent materials ? - Questions & Answers - Unity Discussions

You can do it with shaders by changing the Queue tag in the subshader tags list, indeed. See link posted by getyour411 for the documentation on that.

But there’s an easier way, if you’re not comfortable working with shader code. It’s possible to override the render queue number from scripts instead. Use Material.renderQueue, for example like this:

    renderer.material.renderQueue = 3001;

Notice that 3001 is the same as “Transparent+1” in a shader, because the string “Transparent” in shaderlab is actually just a placeholder for the number 3000. All transparent objects have renderQueue numbers equal to or greater than 3000.

Awesome! For us non engineers, can you provide the script? Thank you.

This doesn’t work, as soon as you enter the play mode it resets back to Transparent as the default.

I found that you CAN actually just set the custom render queue in the editor,

164627-screen-shot-2020-08-02-at-54159-pm.png

but it’s simply flakey.

In current Unity, you sort of have to set it and then quickly press Play (regardless of what scene you’re in or whatever), and then it does seem to “stick” from there on.

Just another Unity hassle! Hope it helps someone.