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.
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.