Hey guys!
Is there a way to modify the priority value of a URP decal material? I want to basically render decals on top of another and vice versa, but I just cant find a way to access this value and modify it via script. I tried to modify the _DrawOrder material property, but I don’t think it’s the right one.
3 Likes
Sorry to necroing this post but I’m looking for this exact thing… I can’t find that “Priority” property anywhere in code and changing the material renderqueue instead doesn’t work…
EDIT: Infact I found how to change that. It’s not documented anywhere but all Decal shader in URP have a “_DrawOrder” parameter and that is this parameter which corresponds to the exposed “Priority” in Inspector! Changing this parameter at runtime with decalMaterial.SetFloat will actually change the “Priority” property in inspector…
Would be nice to document this on Unity side!
As all my Google searches lead to here, I think this information is nice to be up to date here.
1 Like