- Home /
Changing material (Instance) properties has no effect [URP]
I'm trying to change the priority of my custom shader based on a URP / Lit shader. I only changed Ztest in it to Always for overlay drawing. The shader works as I need it, but only if I change the priority manually in the editor. If I do this through code, then changing the priority has no effect until I expand the material settings in the editor (the priority that I set with the code applies to the material, but does not affect the rendering in any way). This applies to any other properties. The build also has this problem.
This is how I change the priority:
mat.SetFloat ("_QueueOffset", mat.GetFloat ("_QueueOffset") + 2);
The shader I'm using:
Your answer
Follow this Question
Related Questions
Shader Animation (and PerRendererData) 1 Answer
Unity Atlas shader Material is is changing the original material of objects 0 Answers
Fresnel shader and mixed textures 0 Answers
Holes in Occlusion Culling a transparent object 0 Answers
Dynamic batching breaks with the material Mobile/Alpha Blended. 0 Answers