Hidde/show channels at runtime via code

Hi friends! Is there any way to acces to the outputs of the standar shader via code? I mean i need a button o link in the game when is pressed the diffuse chanel on ly is show in the game, i click again and the normal channel is only visible, click again and the metallic output is only visible and so on… This for all the materials of my scene. Any idea or hint where find or even if this is possible in unity.

Thanks in advance.

You can set values for different properties of a shader for a material using Set methods for Material like SetFloat, SetTexture, SetColor.

So to hide a normal map just set the value of “_BumpMap” (Common texture name used by Unity’s builtin shaders) to null and Normal map will be hidden. And to show the Normal map just assign your Normal map to this “_BumpMap” property.