Old shader parameters in inspector window

Hello !

I was wondering if there is any way to get the same parameters format of the standard shader in the inspector window, for custom shaders. I find it way better in terms of readability than the old format.

I mean, how can I get small texture icons and sliders instead of BIG icons and values ?

I’ve copy/pasted the code of standard shader to a custom one, and it gave me this :

PS : Sorry for the poor english, it’s not my birth language.

The standard shader uses a custom editor, which is in a separate c# script file. You can look at the StandardShaderGUI.cs file if you download the “Built in shaders” source files.

Be warned the custom editor for the standard shader is quite dense, in part because it does a lot of additional work like hiding parts of the UI based on what you’ve set and setting hidden values on the material itself, but the real meat of it is in the ShaderPropertiesGUI function and the TexturePropertySingleLine and similar functions.

1 Like