예제 #1
0
        // Token: 0x060003E0 RID: 992 RVA: 0x00034AB4 File Offset: 0x00032CB4
        public static string GetNPOTScaleString(TextureImporterNPOTScale value)
        {
            switch ((int)value)
            {
            case 0:
                return("None");

            case 1:
                return("To Nearest");

            case 2:
                return("To Larger");

            case 3:
                return("To Smaller");

            default:
                return(value.ToString());
            }
        }
    public override void DrawImportSettings()
    {
        string          path            = AssetDatabase.GUIDToAssetPath(guid);
        TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

        //If importer is still null, asset can't be found at path
        if (textureImporter == null)
        {
            GUILayout.Label("Texture Asset with GUID: " + guid + " no longer exists.");
        }
        else
        {
            //Name
            GUILayout.Label("Name: " + name);
            //Path
            GUILayout.Label("Path: " + path);
            //GUID
            GUILayout.Label("GUID: " + guid);

            //Aniso level
            GUILayout.Label("Aniso level: " + anisoLevel.ToString(), textureImporter.anisoLevel != anisoLevel ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Border mipmap
            GUILayout.Label("Border mipmap: " + borderMipmap.ToString(), textureImporter.borderMipmap != borderMipmap ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Convert to normal map
            GUILayout.Label("Conver to normal map: " + convertToNormalmap.ToString(), textureImporter.convertToNormalmap != convertToNormalmap ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Correct gamma
            GUILayout.Label("Correct gamma: " + generateMipsInLinearSpace.ToString(), textureImporter.generateMipsInLinearSpace != generateMipsInLinearSpace ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Fadeout
            GUILayout.Label("Fadeout: " + fadeout.ToString(), textureImporter.fadeout != fadeout ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Filter mode
            GUILayout.Label("Filter mode: " + filterMode.ToString(), textureImporter.filterMode != filterMode ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Generate cubemap
            GUILayout.Label("Generate cubemap: " + generateCubemap.ToString(), textureImporter.generateCubemap != generateCubemap ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Heightmap scale
            GUILayout.Label("Heightmap scale: " + heightmapScale.ToString(), textureImporter.heightmapScale != heightmapScale ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Is readable
            GUILayout.Label("Is readable: " + isReadable.ToString(), textureImporter.isReadable != isReadable ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Lightmap
            GUILayout.Label("Lightmap: " + lightmap.ToString(), textureImporter.lightmap != lightmap ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Max texture size
            GUILayout.Label("Max texture size: " + maxTextureSize.ToString(), textureImporter.maxTextureSize != maxTextureSize ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Mipmap bias
            GUILayout.Label("Mipmap bias: " + mipMapBias.ToString(), textureImporter.mipMapBias != mipMapBias ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Mipmap enabled
            GUILayout.Label("Mipmap enabled: " + mipmapEnabled.ToString(), textureImporter.mipmapEnabled != mipmapEnabled ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Mipmap fade distance start
            GUILayout.Label("Mipmap fade distance start: " + mipmapFadeDistanceStart.ToString(), textureImporter.mipmapFadeDistanceStart != mipmapFadeDistanceStart ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Mipmap fade distance end
            GUILayout.Label("Mipmap fade distance end: " + mipmapFadeDistanceEnd.ToString(), textureImporter.mipmapFadeDistanceEnd != mipmapFadeDistanceEnd ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Mipmap filter
            GUILayout.Label("Mipmap filter: " + mipmapFilter.ToString(), textureImporter.mipmapFilter != mipmapFilter ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Normalmap
            GUILayout.Label("Normalmap: " + normalmap.ToString(), textureImporter.normalmap != normalmap ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Normalmap filter
            GUILayout.Label("Normalmap filter: " + normalmapFilter.ToString(), textureImporter.normalmapFilter != normalmapFilter ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //NPOT scale
            GUILayout.Label("NPOT scale: " + npotScale.ToString(), textureImporter.npotScale != npotScale ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Texture format
            GUILayout.Label("Texture format: " + textureFormat.ToString(), textureImporter.textureFormat != textureFormat ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Texture type
            GUILayout.Label("Texture type: " + textureType.ToString(), textureImporter.textureType != textureType ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
            //Wrap mode
            GUILayout.Label("Wrap mode: " + wrapMode.ToString(), textureImporter.wrapMode != wrapMode ? AssetSettingsWindow.singleton.redTextStyle : EditorStyles.label);
        }
    }