Пример #1
0
        public override void SetPreview()
        {
            SetValue(DefaultColor, Shader_Properties.DefaultColor(color));
            SetValue(Attributes, Shader_Properties.PropertyAttributes(attributes));

            base.SetPreview();
        }
Пример #2
0
 private void ExtensionGUI()
 {
     EditorGUI.BeginChangeCheck();
     color = EditorGUILayout.ColorField("默认值", color);
     if (EditorGUI.EndChangeCheck())
     {
         SetValue(DefaultColor, Shader_Properties.DefaultColor(color));
     }
     if (group_attribute.OnGuiBegin("特性"))
     {
         EditorGUI.BeginChangeCheck();
         for (int i = 0; i < attributes.Count; i++)
         {
             var item = attributes[i];
             Shader_Properties.GUI(item, GUI.skin.button);
         }
         if (EditorGUI.EndChangeCheck())
         {
             SetValue(Attributes, Shader_Properties.PropertyAttributes(attributes));
         }
     }
     group_attribute.OnGuiEnd();
 }