UnityEditor.ProceduralMaterialInspector.ShowProceduralTexturesGUI C# (CSharp) Method

ShowProceduralTexturesGUI() protected method

protected ShowProceduralTexturesGUI ( ProceduralMaterial material ) : void
material UnityEngine.ProceduralMaterial
return void
        protected void ShowProceduralTexturesGUI(ProceduralMaterial material)
        {
            if (base.targets.Length <= 1)
            {
                EditorGUILayout.Space();
                Shader s = material.shader;
                if (s != null)
                {
                    EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    GUILayout.Space(4f);
                    GUILayout.FlexibleSpace();
                    float pixels = 10f;
                    bool flag = true;
                    for (int i = 0; i < ShaderUtil.GetPropertyCount(s); i++)
                    {
                        if (ShaderUtil.GetPropertyType(s, i) == ShaderUtil.ShaderPropertyType.TexEnv)
                        {
                            string propertyName = ShaderUtil.GetPropertyName(s, i);
                            Texture tex = material.GetTexture(propertyName);
                            if (SubstanceImporter.IsProceduralTextureSlot(material, tex, propertyName))
                            {
                                string propertyDescription = ShaderUtil.GetPropertyDescription(s, i);
                                Type textureTypeFromDimension = MaterialEditor.GetTextureTypeFromDimension(ShaderUtil.GetTexDim(s, i));
                                GUIStyle style = "ObjectPickerResultsGridLabel";
                                if (flag)
                                {
                                    flag = false;
                                }
                                else
                                {
                                    GUILayout.Space(pixels);
                                }
                                GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Height(((72f + style.fixedHeight) + style.fixedHeight) + 8f) };
                                GUILayout.BeginVertical(options);
                                Rect position = GUILayoutUtility.GetRect((float) 72f, (float) 72f);
                                DoObjectPingField(position, position, GUIUtility.GetControlID(0x3042, FocusType.Keyboard, position), tex, textureTypeFromDimension);
                                this.ShowAlphaSourceGUI(material, tex as ProceduralTexture, ref position);
                                position.height = style.fixedHeight;
                                GUI.Label(position, propertyDescription, style);
                                GUILayout.EndVertical();
                                GUILayout.FlexibleSpace();
                            }
                        }
                    }
                    GUILayout.Space(4f);
                    EditorGUILayout.EndHorizontal();
                }
            }
        }