- Home /
Find HDRP Lit Shader
I want an object to switch to a shader, and then switch back to the HDRP lit shader, but when I use "Shader.Find", The object turns pink, like it can't find the material. How can I find the shader?
Comment
Best Answer
Answer by alx1 · Sep 07, 2019 at 07:55 PM
you can make two material variables and a render variable and do something like this and just drag and drop the materials and render
public Material one;
public Material two;
public Renderer rend;
void Start()
{
rend.material = two;
}
Thanks for the help! I tried that method, but in the end, i just had to use "$$anonymous$$aterial.shader = Shader.Find("HDRP/Lit")" Ins$$anonymous$$d of "Shader.Find("Hidden/HDRP/Lit"))