UnityEditor.TextureImporterInspector.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            if (s_Styles == null)
            {
                s_Styles = new Styles();
            }
            bool enabled = GUI.enabled;
            EditorGUILayout.Space();
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = this.m_TextureType.hasMultipleDifferentValues;
            int index = EditorGUILayout.IntPopup(s_Styles.textureTypeTitle, this.m_TextureType.intValue, s_Styles.textureTypeOptions, s_Styles.textureTypeValues, new GUILayoutOption[0]);
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                this.m_TextureType.intValue = index;
                TextureImporterSettings serializedPropertySettings = this.GetSerializedPropertySettings();
                serializedPropertySettings.ApplyTextureType((TextureImporterType) this.m_TextureType.intValue);
                this.SetSerializedPropertySettings(serializedPropertySettings);
                this.SyncPlatformSettings();
                this.ApplySettingsToTexture();
            }
            int[] array = s_Styles.textureShapeValuesDictionnary[this.m_TextureTypeGUIElements[index].shapeCaps];
            using (new EditorGUI.DisabledScope((array.Length == 1) || (this.m_TextureType.intValue == 4)))
            {
                EditorGUI.BeginChangeCheck();
                EditorGUI.showMixedValue = this.m_TextureShape.hasMultipleDifferentValues;
                int num2 = EditorGUILayout.IntPopup(s_Styles.textureShape, this.m_TextureShape.intValue, s_Styles.textureShapeOptionsDictionnary[this.m_TextureTypeGUIElements[index].shapeCaps], s_Styles.textureShapeValuesDictionnary[this.m_TextureTypeGUIElements[index].shapeCaps], new GUILayoutOption[0]);
                EditorGUI.showMixedValue = false;
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_TextureShape.intValue = num2;
                }
            }
            if (Array.IndexOf<int>(array, this.m_TextureShape.intValue) == -1)
            {
                this.m_TextureShape.intValue = array[0];
            }
            EditorGUILayout.Space();
            if (!this.m_TextureType.hasMultipleDifferentValues)
            {
                this.DoGUIElements(this.m_TextureTypeGUIElements[index].commonElements, this.m_GUIElementsDisplayOrder);
                if (this.m_TextureTypeGUIElements[index].advancedElements != TextureInspectorGUIElement.None)
                {
                    EditorGUILayout.Space();
                    this.m_ShowAdvanced = EditorGUILayout.Foldout(this.m_ShowAdvanced, s_Styles.showAdvanced, true);
                    if (this.m_ShowAdvanced)
                    {
                        EditorGUI.indentLevel++;
                        this.DoGUIElements(this.m_TextureTypeGUIElements[index].advancedElements, this.m_GUIElementsDisplayOrder);
                        EditorGUI.indentLevel--;
                    }
                }
            }
            EditorGUILayout.Space();
            this.TextureSettingsGUI();
            this.ShowPlatformSpecificSettings();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.FlexibleSpace();
            base.ApplyRevertGUI();
            GUILayout.EndHorizontal();
            this.UpdateImportWarning();
            if (this.m_ImportWarning != null)
            {
                EditorGUILayout.HelpBox(this.m_ImportWarning, MessageType.Warning);
            }
            GUI.enabled = enabled;
        }