public TextureGenerationSettings(TextureImporterType type)
        {
            this.m_EnablePostProcessor      = true;
            this.m_AssetPath                = "";
            this.m_ImageDataSize            = 0;
            this.m_QualifyForSpritePacking  = false;
            this.m_SpritePackingTag         = "";
            this.m_ImageData                = 0;
            this.m_SpriteImportData         = null;
            this.m_SourceTextureInformation = new SourceTextureInformation();
            SourceTextureInformation arg_62_0 = this.m_SourceTextureInformation;
            int num = 0;

            this.m_SourceTextureInformation.height = num;
            arg_62_0.width = num;
            this.m_SourceTextureInformation.containsAlpha = false;
            this.m_SourceTextureInformation.hdr           = false;
            this.m_PlatformSettings                      = new TextureImporterPlatformSettings();
            this.m_PlatformSettings.overridden           = false;
            this.m_PlatformSettings.format               = TextureImporterFormat.Automatic;
            this.m_PlatformSettings.maxTextureSize       = 2048;
            this.m_PlatformSettings.allowsAlphaSplitting = false;
            this.m_PlatformSettings.resizeAlgorithm      = TextureResizeAlgorithm.Mitchell;
            this.m_PlatformSettings.compressionQuality   = 50;
            this.m_PlatformSettings.crunchedCompression  = false;
            this.m_PlatformSettings.name                 = TextureImporter.defaultPlatformName;
            this.m_Settings                          = new TextureImporterSettings();
            this.m_Settings.textureType              = type;
            this.m_Settings.textureShape             = TextureImporterShape.Texture2D;
            this.m_Settings.convertToNormalMap       = false;
            this.m_Settings.mipmapEnabled            = true;
            this.m_Settings.mipmapFilter             = TextureImporterMipFilter.BoxFilter;
            this.m_Settings.sRGBTexture              = true;
            this.m_Settings.borderMipmap             = false;
            this.m_Settings.mipMapsPreserveCoverage  = false;
            this.m_Settings.alphaTestReferenceValue  = 0.5f;
            this.m_Settings.readable                 = false;
            this.m_Settings.fadeOut                  = false;
            this.m_Settings.mipmapFadeDistanceStart  = 1;
            this.m_Settings.mipmapFadeDistanceEnd    = 3;
            this.m_Settings.heightmapScale           = 0.25f;
            this.m_Settings.normalMapFilter          = TextureImporterNormalFilter.Standard;
            this.m_Settings.cubemapConvolution       = TextureImporterCubemapConvolution.None;
            this.m_Settings.generateCubemap          = TextureImporterGenerateCubemap.AutoCubemap;
            this.m_Settings.seamlessCubemap          = false;
            this.m_Settings.npotScale                = TextureImporterNPOTScale.ToNearest;
            this.m_Settings.spriteMode               = 1;
            this.m_Settings.spriteExtrude            = 1u;
            this.m_Settings.spriteMeshType           = SpriteMeshType.Tight;
            this.m_Settings.spriteAlignment          = 0;
            this.m_Settings.spritePivot              = Vector2.one * 0.5f;
            this.m_Settings.spritePixelsPerUnit      = 100f;
            this.m_Settings.spriteBorder             = Vector4.zero;
            this.m_Settings.alphaSource              = TextureImporterAlphaSource.FromInput;
            this.m_Settings.alphaIsTransparency      = false;
            this.m_Settings.spriteTessellationDetail = -1f;
            TextureImporterSettings arg_2AD_0       = this.m_Settings;
            TextureWrapMode         textureWrapMode = TextureWrapMode.Repeat;

            this.m_Settings.wrapModeW = textureWrapMode;
            textureWrapMode           = textureWrapMode;
            this.m_Settings.wrapModeV = textureWrapMode;
            textureWrapMode           = textureWrapMode;
            this.m_Settings.wrapModeU = textureWrapMode;
            arg_2AD_0.wrapMode        = textureWrapMode;
            switch (type)
            {
            case TextureImporterType.Default:
                this.m_Settings.sRGBTexture   = true;
                this.m_Settings.mipmapEnabled = true;
                break;

            case TextureImporterType.NormalMap:
                this.m_Settings.sRGBTexture = false;
                break;

            case TextureImporterType.GUI:
            {
                this.m_Settings.sRGBTexture         = false;
                this.m_Settings.mipmapEnabled       = false;
                this.m_Settings.alphaIsTransparency = true;
                this.m_Settings.npotScale           = TextureImporterNPOTScale.None;
                this.m_Settings.aniso = 1;
                TextureImporterSettings arg_384_0 = this.m_Settings;
                textureWrapMode           = TextureWrapMode.Clamp;
                this.m_Settings.wrapModeW = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeV = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeU = textureWrapMode;
                arg_384_0.wrapMode        = textureWrapMode;
                break;
            }

            case TextureImporterType.Cookie:
            {
                this.m_Settings.borderMipmap = true;
                TextureImporterSettings arg_4B9_0 = this.m_Settings;
                textureWrapMode           = TextureWrapMode.Clamp;
                this.m_Settings.wrapModeW = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeV = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeU = textureWrapMode;
                arg_4B9_0.wrapMode        = textureWrapMode;
                this.m_Settings.aniso     = 0;
                break;
            }

            case TextureImporterType.Lightmap:
                this.m_Settings.sRGBTexture         = true;
                this.m_Settings.npotScale           = TextureImporterNPOTScale.ToNearest;
                this.m_Settings.alphaIsTransparency = false;
                this.m_Settings.alphaSource         = TextureImporterAlphaSource.None;
                break;

            case TextureImporterType.Cursor:
            {
                this.m_Settings.readable            = true;
                this.m_Settings.alphaIsTransparency = true;
                this.m_Settings.mipmapEnabled       = false;
                this.m_Settings.npotScale           = TextureImporterNPOTScale.None;
                this.m_Settings.aniso = 1;
                TextureImporterSettings arg_472_0 = this.m_Settings;
                textureWrapMode           = TextureWrapMode.Clamp;
                this.m_Settings.wrapModeW = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeV = textureWrapMode;
                textureWrapMode           = textureWrapMode;
                this.m_Settings.wrapModeU = textureWrapMode;
                arg_472_0.wrapMode        = textureWrapMode;
                break;
            }

            case TextureImporterType.Sprite:
            {
                this.m_Settings.npotScale           = TextureImporterNPOTScale.None;
                this.m_Settings.alphaIsTransparency = true;
                this.m_Settings.mipmapEnabled       = false;
                this.m_Settings.sRGBTexture         = true;
                TextureImporterSettings arg_3EF_0 = this.m_Settings;
                textureWrapMode             = TextureWrapMode.Clamp;
                this.m_Settings.wrapModeW   = textureWrapMode;
                textureWrapMode             = textureWrapMode;
                this.m_Settings.wrapModeV   = textureWrapMode;
                textureWrapMode             = textureWrapMode;
                this.m_Settings.wrapModeU   = textureWrapMode;
                arg_3EF_0.wrapMode          = textureWrapMode;
                this.m_Settings.alphaSource = TextureImporterAlphaSource.FromInput;
                break;
            }

            case TextureImporterType.SingleChannel:
                this.m_Settings.sRGBTexture = false;
                break;
            }
        }
        public TextureGenerationSettings(TextureImporterType type)
        {
            m_EnablePostProcessor     = true;
            m_AssetPath               = "";
            m_QualifyForSpritePacking = false;
            m_SpritePackingTag        = "";
            m_SpriteImportData        = null;

            m_SourceTextureInformation               = new SourceTextureInformation();
            m_SourceTextureInformation.width         = m_SourceTextureInformation.height = 0;
            m_SourceTextureInformation.containsAlpha = false;
            m_SourceTextureInformation.hdr           = false;

            m_PlatformSettings                      = new TextureImporterPlatformSettings();
            m_PlatformSettings.overridden           = false;
            m_PlatformSettings.format               = TextureImporterFormat.Automatic;
            m_PlatformSettings.maxTextureSize       = 2048;
            m_PlatformSettings.allowsAlphaSplitting = false;
            m_PlatformSettings.resizeAlgorithm      = TextureResizeAlgorithm.Mitchell;
            m_PlatformSettings.compressionQuality   = (int)TextureCompressionQuality.Normal;
            m_PlatformSettings.crunchedCompression  = false;
            m_PlatformSettings.name                 = TextureImporter.defaultPlatformName;

            // Values from TextureImporterSettings native constructor
            m_Settings                          = new TextureImporterSettings();
            m_Settings.textureType              = type;
            m_Settings.textureShape             = TextureImporterShape.Texture2D;
            m_Settings.convertToNormalMap       = false;
            m_Settings.mipmapEnabled            = true;
            m_Settings.mipmapFilter             = TextureImporterMipFilter.BoxFilter;
            m_Settings.sRGBTexture              = true;
            m_Settings.borderMipmap             = false;
            m_Settings.mipMapsPreserveCoverage  = false;
            m_Settings.alphaTestReferenceValue  = 0.5f;
            m_Settings.readable                 = false;
            m_Settings.fadeOut                  = false;
            m_Settings.mipmapFadeDistanceStart  = 1;
            m_Settings.mipmapFadeDistanceEnd    = 3;
            m_Settings.heightmapScale           = 0.25f;
            m_Settings.normalMapFilter          = TextureImporterNormalFilter.Standard;
            m_Settings.cubemapConvolution       = 0;
            m_Settings.generateCubemap          = TextureImporterGenerateCubemap.AutoCubemap;
            m_Settings.seamlessCubemap          = false;
            m_Settings.npotScale                = TextureImporterNPOTScale.ToNearest;
            m_Settings.spriteMode               = (int)SpriteImportMode.Single;
            m_Settings.spriteExtrude            = 1;
            m_Settings.spriteMeshType           = SpriteMeshType.Tight;
            m_Settings.spriteAlignment          = (int)SpriteAlignment.Center;
            m_Settings.spritePivot              = Vector2.one * 0.5f;
            m_Settings.spritePixelsPerUnit      = 100;
            m_Settings.spriteBorder             = Vector4.zero;
            m_Settings.alphaSource              = TextureImporterAlphaSource.FromInput;
            m_Settings.alphaIsTransparency      = false;
            m_Settings.spriteTessellationDetail = -1;
            m_Settings.wrapMode                 = m_Settings.wrapModeU = m_Settings.wrapModeV = m_Settings.wrapModeW = TextureWrapMode.Repeat;

            // From TextureImporterSettings::ApplyTextureType
            switch (type)
            {
            case TextureImporterType.Default:
                m_Settings.sRGBTexture   = true;
                m_Settings.mipmapEnabled = true;
                break;

            case TextureImporterType.NormalMap:
                m_Settings.sRGBTexture = false;
                break;

            case TextureImporterType.GUI:
                m_Settings.sRGBTexture         = false;
                m_Settings.mipmapEnabled       = false;
                m_Settings.alphaIsTransparency = true;
                m_Settings.npotScale           = TextureImporterNPOTScale.None;
                m_Settings.aniso    = 1;
                m_Settings.wrapMode = m_Settings.wrapModeU = m_Settings.wrapModeV = m_Settings.wrapModeW = TextureWrapMode.Clamp;
                break;

            case TextureImporterType.Sprite:
                m_Settings.npotScale           = TextureImporterNPOTScale.None;
                m_Settings.alphaIsTransparency = true;
                m_Settings.mipmapEnabled       = false;
                m_Settings.sRGBTexture         = true;
                m_Settings.wrapMode            = m_Settings.wrapModeU = m_Settings.wrapModeV = m_Settings.wrapModeW = TextureWrapMode.Clamp;
                m_Settings.alphaSource         = TextureImporterAlphaSource.FromInput;
                break;

            case TextureImporterType.Cursor:
                m_Settings.readable            = true;
                m_Settings.alphaIsTransparency = true;
                m_Settings.mipmapEnabled       = false;
                m_Settings.npotScale           = TextureImporterNPOTScale.None;
                m_Settings.aniso    = 1;
                m_Settings.wrapMode = m_Settings.wrapModeU = m_Settings.wrapModeV = m_Settings.wrapModeW = TextureWrapMode.Clamp;
                break;

            case TextureImporterType.Cookie:
                m_Settings.borderMipmap = true;
                m_Settings.wrapMode     = m_Settings.wrapModeU = m_Settings.wrapModeV = m_Settings.wrapModeW = TextureWrapMode.Clamp;
                m_Settings.aniso        = 0;
                break;

            case TextureImporterType.Lightmap:
                m_Settings.sRGBTexture         = true;
                m_Settings.npotScale           = TextureImporterNPOTScale.ToNearest;
                m_Settings.alphaIsTransparency = false;
                m_Settings.alphaSource         = TextureImporterAlphaSource.None;
                break;

            case TextureImporterType.SingleChannel:
                m_Settings.sRGBTexture = false;
                break;
            }
        }