|
I would like to have a shader selection drop-down (similar to that found in the material inspector) to allow users to select the shader that they would like to use with batch-generated materials. If there is no way to reuse the material inspector field, how can this be reproduced?
(comments are locked)
|
|
I think that I have finally found my answer: This appears to be a better solution than my previous one because it works without having previously selected the shader popup menu for a material. Not perfect, but as good as I could figure out. Hi Lea, how did you feed the Shader[] to your custom editor UI to show the selection drop down?
Jan 03 at 02:29 AM
Ian Smithers
@Ian I have put an example together for you: http://pastebin.com/bbDhu0NX
Jan 03 at 02:22 PM
numberkruncher
(comments are locked)
|
|
C# ShaderToImport = EditorGUILayout.ObjectField(ShaderToImport, typeof(Shader), true) as Shader; Nice idea, though unfortunately this doesn't allow one to select from the built-in shaders. Do you know if there is a way to get a list of all available shaders? Perhaps such a list could be used to produce a similar but custom control. Thanks
Aug 26 '12 at 11:07 PM
numberkruncher
Aug 27 '12 at 07:28 AM
ScroodgeM
(comments are locked)
|
