UnityEditor.SpeedTreeMaterialInspector.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            SerializedProperty property = base.serializedObject.FindProperty("m_Shader");
            if ((base.isVisible && !property.hasMultipleDifferentValues) && (property.objectReferenceValue != null))
            {
                List<MaterialProperty> list = new List<MaterialProperty>(MaterialEditor.GetMaterialProperties(base.targets));
                base.SetDefaultGUIWidths();
                SpeedTreeGeometryType[] source = new SpeedTreeGeometryType[base.targets.Length];
                for (int i = 0; i < base.targets.Length; i++)
                {
                    source[i] = SpeedTreeGeometryType.Branch;
                    for (int j = 0; j < this.speedTreeGeometryTypeString.Length; j++)
                    {
                        if (Enumerable.Contains<string>(((Material) base.targets[i]).shaderKeywords, this.speedTreeGeometryTypeString[j]))
                        {
                            source[i] = (SpeedTreeGeometryType) j;
                            break;
                        }
                    }
                }
                EditorGUI.showMixedValue = Enumerable.Count<SpeedTreeGeometryType>(Enumerable.Distinct<SpeedTreeGeometryType>(source)) > 1;
                EditorGUI.BeginChangeCheck();
                SpeedTreeGeometryType geomType = (SpeedTreeGeometryType) EditorGUILayout.EnumPopup("Geometry Type", source[0], new GUILayoutOption[0]);
                if (EditorGUI.EndChangeCheck())
                {
                    bool flag = this.ShouldEnableAlphaTest(geomType);
                    CullMode mode = !flag ? CullMode.Back : CullMode.Off;
                    foreach (Material material in Enumerable.Cast<Material>(base.targets))
                    {
                        if (flag)
                        {
                            material.SetOverrideTag("RenderType", "treeTransparentCutout");
                        }
                        for (int k = 0; k < this.speedTreeGeometryTypeString.Length; k++)
                        {
                            material.DisableKeyword(this.speedTreeGeometryTypeString[k]);
                        }
                        material.EnableKeyword(this.speedTreeGeometryTypeString[(int) geomType]);
                        material.renderQueue = !flag ? 0x7d0 : 0x992;
                        material.SetInt("_Cull", (int) mode);
                    }
                }
                EditorGUI.showMixedValue = false;
                if (<>f__am$cache0 == null)
                {
                    <>f__am$cache0 = prop => prop.name == "_MainTex";
SpeedTreeMaterialInspector