UnityEditor.TextureImporterInspector.TextureSettingsGUI C# (CSharp) Метод

TextureSettingsGUI() приватный Метод

private TextureSettingsGUI ( ) : void
Результат void
        private void TextureSettingsGUI()
        {
            EditorGUI.BeginChangeCheck();
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = this.m_WrapMode.hasMultipleDifferentValues;
            TextureWrapMode intValue = (TextureWrapMode) this.m_WrapMode.intValue;
            if (intValue == ~TextureWrapMode.Repeat)
            {
                intValue = TextureWrapMode.Repeat;
            }
            intValue = (TextureWrapMode) EditorGUILayout.EnumPopup(EditorGUIUtility.TempContent("Wrap Mode"), intValue, new GUILayoutOption[0]);
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                this.m_WrapMode.intValue = (int) intValue;
            }
            if (((this.m_NPOTScale.intValue == 0) && (intValue == TextureWrapMode.Repeat)) && !ShaderUtil.hardwareSupportsFullNPOT)
            {
                bool flag = false;
                foreach (Object obj2 in base.targets)
                {
                    int width = -1;
                    int height = -1;
                    ((TextureImporter) obj2).GetWidthAndHeight(ref width, ref height);
                    if (!Mathf.IsPowerOfTwo(width) || !Mathf.IsPowerOfTwo(height))
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag)
                {
                    EditorGUILayout.HelpBox(EditorGUIUtility.TextContent("Graphics device doesn't support Repeat wrap mode on NPOT textures. Falling back to Clamp.").text, MessageType.Warning, true);
                }
            }
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = this.m_FilterMode.hasMultipleDifferentValues;
            FilterMode trilinear = (FilterMode) this.m_FilterMode.intValue;
            if (trilinear == ~FilterMode.Point)
            {
                if ((this.m_FadeOut.intValue > 0) || (this.m_ConvertToNormalMap.intValue > 0))
                {
                    trilinear = FilterMode.Trilinear;
                }
                else
                {
                    trilinear = FilterMode.Bilinear;
                }
            }
            trilinear = (FilterMode) EditorGUILayout.IntPopup(s_Styles.filterMode, (int) trilinear, s_Styles.filterModeOptions, this.m_FilterModeOptions, new GUILayoutOption[0]);
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                this.m_FilterMode.intValue = (int) trilinear;
            }
            bool flag2 = ((this.m_FilterMode.intValue != 0) && (this.m_EnableMipMap.intValue > 0)) && (this.m_TextureShape.intValue != 2);
            using (new EditorGUI.DisabledScope(!flag2))
            {
                EditorGUI.BeginChangeCheck();
                EditorGUI.showMixedValue = this.m_Aniso.hasMultipleDifferentValues;
                int num4 = this.m_Aniso.intValue;
                if (num4 == -1)
                {
                    num4 = 1;
                }
                num4 = EditorGUILayout.IntSlider("Aniso Level", num4, 0, 0x10, new GUILayoutOption[0]);
                EditorGUI.showMixedValue = false;
                if (EditorGUI.EndChangeCheck())
                {
                    this.m_Aniso.intValue = num4;
                }
                TextureInspector.DoAnisoGlobalSettingNote(num4);
            }
            if (EditorGUI.EndChangeCheck())
            {
                this.ApplySettingsToTexture();
            }
        }