public void ShaderPropertiesGUI(Material material)
 {
     EditorGUI.BeginChangeCheck();
     {
         m_MaterialScopeList.DrawHeaders(materialEditor, material);
         if (EditorGUI.EndChangeCheck())
         {
             UpdateMaterials(materialEditor);
         }
     }
 }
示例#2
0
        /// <summary>
        /// Override this function to implement your custom GUI. To display a user interface similar to HDRP shaders, use a MaterialUIBlockList.
        /// </summary>
        /// <param name="materialEditor">The current material editor.</param>
        /// <param name="props">The list of properties the material has.</param>
        public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props)
        {
            DecalMeshWarning();

            m_MaterialEditor = materialEditor;
            FindProperties(props);

            Material material = materialEditor.target as Material;

            using (var changed = new EditorGUI.ChangeCheckScope())
            {
                m_MaterialScopeList.DrawHeaders(materialEditor, material);
            }

            // We should always do this call at the end
            materialEditor.serializedObject.ApplyModifiedProperties();
        }
示例#3
0
 public void ShaderPropertiesGUI(Material material)
 {
     m_MaterialScopeList.DrawHeaders(materialEditor, material);
 }
示例#4
0
 void ShaderPropertiesGUI(MaterialEditor materialEditor, Material material, MaterialProperty[] properties)
 {
     m_MaterialScopeList.DrawHeaders(materialEditor, material);
 }