I copied the shader properties from HDRPLit in the “Production Ready Shaders” sample, but my shader
inspector does not show the drop down list.
My shader GUI is customed. But that said, simply just a copied and with unnecessary parts removed.
I thought it was displaying a drop-down list from an API on the code, for example materialEditor.~, but it doesn’t look that way. Does anyone know more about this?
Unity 6000.0.30f1, HDRP, Shader Graph 17.0.3
Hi @emptybraces ,
Looking into the Lit.shader source, line 157 (Unity 6000.0.30f1), you can see that it’s using an Enum attribute.
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase("UV Set for base", Float) = 0
This uses the built-in Enum MaterialPropertyDrawer.
Shader Graph doesn’t let you set attributes on Properties.
Please upvote the feature request here on the Product Portal.
A custom ShaderGUI allows you to modify the layout and visibility of properties, and while a lot of it is provided by the MaterialEditor and ShaderGUI base classes, some features just leverage those ShaderLab Attributes and MaterialPropertyDrawers.
I know it doesn’t help you much right now, but your feedback will help us improve on the topic.
Thanks!
1 Like
Hi,
thank you for your kind reply. I understand, and done upvoted!
1 Like