What are the property names in the new Unity 5 standard shader

Hello, I am trying to assign textures and such via C# code to the new standard shaders using the functions found in the Material class (setTexture, setFloat, etc).
The problem is, I don’t know what the properties are called or how to find that out (google is no help so far).
To be clear, something like this.
go.GetComponent().material.setTexture(“Diffuse”, someTexture);

I have tried “Diffuse”, “_Diffuse”, “Albedo”, “_Albedo”.
I would like all the names of the properties available in the shader.
As a bonus, pointing me as to how to find the information myself in the future is a plus.

Hi @Jopan! I know I’m a bit late to this thread, but you can also select a Game Object, right-click on its material, and select ‘Edit Shader’ to see a list of its properties in the Inspector. Pretty handy.

49321-editshader.png

And if by chance you’re still working on updating your Materials to use the Standard shaders, I actually just released a tool on the Asset Store called Legacy 2 PBR that might help you if you’re still having any trouble. I invite you to check it out. :slight_smile:

Answer to my own question.

Diffuse - “_MainTex”

Specular/Roughness - “_SpecGlossMap”

Normal - “_BumpMap”

AO - “_Occlusion”

etc…

You can find these by switching the inspector to debug mode. Then inspecting the standard material.

thank you so much

i’ve been looking for the correct property name for days!!!

it was _GlossMapScale → the property that control Smoothness

thank you man, thank you lord!