edit the color belonging to the surface inputs of a shader (of type HDRP/Unlit) using scripts
Hello how can I change the color belonging to the surface inputs of a shader (of type HDRP/Unlit) using scripts ?
I tried to use these lines of codes:
myGameObject_renderer.material.shader = Shader.Find("_Color");
myGameObject_renderer.material.SetColor("_Color", Color.green);
But it's not working my object is getting purple.
Any idea ?
Comment
Best Answer
Answer by fdiba · Aug 07, 2019 at 01:56 PM
Ok, I did find the solution:
myGameObject_renderer.material.SetColor("_UnlitColor", Color.green);