public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties, IList <string> keywords, SignalPersistentSave signal, int mask)
            {
                if ((mask & Field.Mask) == 0)
                {
                    return;
                }

                var    materialProperty = ShaderDrawerHelper.PublicFindProperty(Field.ShaderFieldName, properties);
                string displayName      = Field.ReflectiveField.Name;

                materialEditor.ShaderProperty(materialProperty, displayName);
            }
Exemple #2
0
            public static bool TryCreate(ShaderField field, MaterialProperty[] properties, out IFieldDrawer drawer)
            {
                var materialProperty = ShaderDrawerHelper.PublicFindProperty(field.ShaderFieldName, properties);

                if (materialProperty != null)
                {
                    drawer = new StandardFieldDrawer(field, materialProperty);
                    return(true);
                }
                else
                {
                    drawer = default(IFieldDrawer);
                    return(false);
                }
            }