public static void GenerateSelectedIconsWithMips()
 {
     if (Selection.activeInstanceID == 0)
     {
         Debug.Log((object)("Ensure to select a mip texture..." + (object)Selection.activeInstanceID));
     }
     else
     {
         GenerateIconsWithMipLevels.InputData inputData = new GenerateIconsWithMipLevels.InputData();
         inputData.sourceFolder     = GenerateIconsWithMipLevels.k_IconSourceFolder;
         inputData.targetFolder     = GenerateIconsWithMipLevels.k_IconTargetFolder;
         inputData.mipIdentifier    = "@";
         inputData.mipFileExtension = "png";
         string assetPath = AssetDatabase.GetAssetPath(Selection.activeInstanceID);
         if (assetPath.IndexOf(inputData.sourceFolder) < 0)
         {
             Debug.Log((object)("Selection is not a valid mip texture, it should be located in: " + inputData.sourceFolder));
         }
         else if (assetPath.IndexOf(inputData.mipIdentifier) < 0)
         {
             Debug.Log((object)("Selection does not have a valid mip identifier " + assetPath + "  " + inputData.mipIdentifier));
         }
         else
         {
             float         realtimeSinceStartup = Time.realtimeSinceStartup;
             string        str            = assetPath.Replace(inputData.sourceFolder, string.Empty);
             string        baseName       = str.Substring(0, str.LastIndexOf(inputData.mipIdentifier));
             List <string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);
             GenerateIconsWithMipLevels.EnsureFolderIsCreated(inputData.targetFolder);
             GenerateIconsWithMipLevels.GenerateIcon(inputData, baseName, iconAssetPaths);
             Debug.Log((object)string.Format("Generated {0} icon with mip levels in {1} seconds", (object)baseName, (object)(float)((double)Time.realtimeSinceStartup - (double)realtimeSinceStartup)));
             InternalEditorUtility.RepaintAllViews();
         }
     }
 }
Пример #2
0
    public static void GenerateSelectedIconsWithMips()
    {
        if (Selection.activeInstanceID == 0)
        {
            Debug.Log("Ensure to select a mip texture..." + Selection.activeInstanceID);
            return;
        }
        GenerateIconsWithMipLevels.InputData inputData = GenerateIconsWithMipLevels.GetInputData();
        int    activeInstanceID = Selection.activeInstanceID;
        string assetPath        = AssetDatabase.GetAssetPath(activeInstanceID);

        if (assetPath.IndexOf(inputData.sourceFolder) < 0)
        {
            Debug.Log("Selection is not a valid mip texture, it should be located in: " + inputData.sourceFolder);
            return;
        }
        if (assetPath.IndexOf(inputData.mipIdentifier) < 0)
        {
            Debug.Log("Selection does not have a valid mip identifier " + assetPath + "  " + inputData.mipIdentifier);
            return;
        }
        float  realtimeSinceStartup = Time.realtimeSinceStartup;
        string text = assetPath.Replace(inputData.sourceFolder, string.Empty);

        text = text.Substring(0, text.LastIndexOf(inputData.mipIdentifier));
        List <string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);

        GenerateIconsWithMipLevels.EnsureFolderIsCreated(inputData.targetFolder);
        GenerateIconsWithMipLevels.GenerateIcon(inputData, text, iconAssetPaths);
        Debug.Log(string.Format("Generated {0} icon with mip levels in {1} seconds", text, Time.realtimeSinceStartup - realtimeSinceStartup));
        InternalEditorUtility.RepaintAllViews();
    }
Пример #3
0
 public static void DoIt()
 {
     GenerateIconsWithMipLevels.DeleteGeneratedFolder();
     EditorApplication.ExecuteMenuItem("Tools/Regenerate All Gizmos Icons with Mips");
     EditorApplication.ExecuteMenuItem("Tools/Regenerate Editor Skins Now");
     AssembleEditorSkin.RegenerateAllIconsWithMipLevels();
 }
 private static void GenerateIconsWithMips(GenerateIconsWithMipLevels.InputData inputData)
 {
   List<string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);
   if (iconAssetPaths.Count == 0)
     Debug.LogWarning((object) ("No mip files found for generating icons! Searching in: " + inputData.sourceFolder + ", for files with extension: " + inputData.mipFileExtension));
   foreach (string baseName in GenerateIconsWithMipLevels.GetBaseNames(inputData, iconAssetPaths))
     GenerateIconsWithMipLevels.GenerateIcon(inputData, baseName, iconAssetPaths);
 }
Пример #5
0
 private static void EnsureFolderIsCreatedRecursively(string targetFolder)
 {
     if (AssetDatabase.GetMainAssetInstanceID(targetFolder) == 0)
     {
         GenerateIconsWithMipLevels.EnsureFolderIsCreatedRecursively(Path.GetDirectoryName(targetFolder));
         Debug.Log("Created target folder " + targetFolder);
         AssetDatabase.CreateFolder(Path.GetDirectoryName(targetFolder), Path.GetFileName(targetFolder));
     }
 }
Пример #6
0
 public static void DeleteGeneratedFolder()
 {
     GenerateIconsWithMipLevels.InputData inputData = GenerateIconsWithMipLevels.GetInputData();
     if (AssetDatabase.GetMainAssetInstanceID(inputData.targetFolder) != 0)
     {
         AssetDatabase.DeleteAsset(inputData.targetFolder);
         AssetDatabase.Refresh();
     }
 }
Пример #7
0
    private static Texture2D CreateIconWithMipLevels(GenerateIconsWithMipLevels.InputData inputData, string baseName, List <string> assetPathsOfAllIcons)
    {
        List <string>    list  = assetPathsOfAllIcons.FindAll((string o) => o.IndexOf('/' + baseName + inputData.mipIdentifier) >= 0);
        List <Texture2D> list2 = new List <Texture2D>();

        foreach (string current in list)
        {
            Texture2D texture2D = GenerateIconsWithMipLevels.GetTexture2D(current);
            if (texture2D != null)
            {
                list2.Add(texture2D);
            }
            else
            {
                Debug.LogError("Mip not found " + current);
            }
        }
        int num  = 99999;
        int num2 = 0;

        foreach (Texture2D current2 in list2)
        {
            int width = current2.width;
            if (width > num2)
            {
                num2 = width;
            }
            if (width < num)
            {
                num = width;
            }
        }
        if (num2 == 0)
        {
            return(null);
        }
        Texture2D texture2D2 = new Texture2D(num2, num2, TextureFormat.ARGB32, true, true);

        if (GenerateIconsWithMipLevels.BlitMip(texture2D2, inputData.GetMipFileName(baseName, num2), 0))
        {
            texture2D2.Apply(true);
            int num3 = num2;
            for (int i = 1; i < texture2D2.mipmapCount; i++)
            {
                num3 /= 2;
                if (num3 < num)
                {
                    break;
                }
                GenerateIconsWithMipLevels.BlitMip(texture2D2, inputData.GetMipFileName(baseName, num3), i);
            }
            texture2D2.Apply(false, true);
            return(texture2D2);
        }
        return(texture2D2);
    }
    private static bool BlitMip(Texture2D iconWithMips, string mipFile, int mipLevel)
    {
        Texture2D texture2D = GenerateIconsWithMipLevels.GetTexture2D(mipFile);

        if ((bool)((UnityEngine.Object)texture2D))
        {
            GenerateIconsWithMipLevels.Blit(texture2D, iconWithMips, mipLevel);
            return(true);
        }
        Debug.Log((object)("Mip file NOT found: " + mipFile));
        return(false);
    }
Пример #9
0
    public static void GenerateAllIconsWithMipLevels()
    {
        GenerateIconsWithMipLevels.InputData inputData = GenerateIconsWithMipLevels.GetInputData();
        GenerateIconsWithMipLevels.EnsureFolderIsCreated(inputData.targetFolder);
        float realtimeSinceStartup = Time.realtimeSinceStartup;

        GenerateIconsWithMipLevels.GenerateIconsWithMips(inputData);
        Debug.Log(string.Format("Generated {0} icons with mip levels in {1} seconds", inputData.generatedFileNames.Count, Time.realtimeSinceStartup - realtimeSinceStartup));
        GenerateIconsWithMipLevels.RemoveUnusedFiles(inputData.generatedFileNames);
        AssetDatabase.Refresh();
        InternalEditorUtility.RepaintAllViews();
    }
    private static void GenerateIconsWithMips(GenerateIconsWithMipLevels.InputData inputData)
    {
        List <string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);

        if (iconAssetPaths.Count == 0)
        {
            Debug.LogWarning((object)("No mip files found for generating icons! Searching in: " + inputData.sourceFolder + ", for files with extension: " + inputData.mipFileExtension));
        }
        foreach (string baseName in GenerateIconsWithMipLevels.GetBaseNames(inputData, iconAssetPaths))
        {
            GenerateIconsWithMipLevels.GenerateIcon(inputData, baseName, iconAssetPaths);
        }
    }
 private static void RemoveUnusedFiles(List <string> generatedFiles)
 {
     for (int index = 0; index < generatedFiles.Count; ++index)
     {
         string str = generatedFiles[index].Replace("Icons/Generated", "Icons").Replace(".asset", ".png");
         GenerateIconsWithMipLevels.DeleteFile(str);
         string withoutExtension = Path.GetFileNameWithoutExtension(str);
         if (!withoutExtension.StartsWith("d_"))
         {
             GenerateIconsWithMipLevels.DeleteFile(str.Replace(withoutExtension, "d_" + withoutExtension));
         }
     }
     AssetDatabase.Refresh();
 }
	private static void GenerateIconsWithMips(GenerateIconsWithMipLevels.InputData inputData)
	{
		List<string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);
		if (iconAssetPaths.Count == 0)
		{
			Debug.LogWarning("No mip files found for generating icons! Searching in: " + inputData.sourceFolder + ", for files with extension: " + inputData.mipFileExtension);
		}
		string[] baseNames = GenerateIconsWithMipLevels.GetBaseNames(inputData, iconAssetPaths);
		string[] array = baseNames;
		for (int i = 0; i < array.Length; i++)
		{
			string baseName = array[i];
			GenerateIconsWithMipLevels.GenerateIcon(inputData, baseName, iconAssetPaths);
		}
	}
Пример #13
0
 private static void RemoveUnusedFiles(List <string> generatedFiles)
 {
     for (int i = 0; i < generatedFiles.Count; i++)
     {
         string text = generatedFiles[i].Replace("Icons/Generated", "Icons");
         text = text.Replace(".asset", ".png");
         GenerateIconsWithMipLevels.DeleteFile(text);
         string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(text);
         if (!fileNameWithoutExtension.StartsWith("d_"))
         {
             text = text.Replace(fileNameWithoutExtension, "d_" + fileNameWithoutExtension);
             GenerateIconsWithMipLevels.DeleteFile(text);
         }
     }
     AssetDatabase.Refresh();
 }
Пример #14
0
    private static void GenerateIcon(GenerateIconsWithMipLevels.InputData inputData, string baseName, List <string> assetPathsOfAllIcons)
    {
        string text = inputData.targetFolder + "/" + baseName + " Icon.asset";

        GenerateIconsWithMipLevels.EnsureFolderIsCreatedRecursively(Path.GetDirectoryName(text));
        Texture2D texture2D = GenerateIconsWithMipLevels.CreateIconWithMipLevels(inputData, baseName, assetPathsOfAllIcons);

        if (texture2D == null)
        {
            Debug.Log("CreateIconWithMipLevels failed");
            return;
        }
        texture2D.name = baseName + " Icon.png";
        AssetDatabase.CreateAsset(texture2D, text);
        inputData.generatedFileNames.Add(text);
    }
 private static void GenerateIcon(GenerateIconsWithMipLevels.InputData inputData, string baseName, List<string> assetPathsOfAllIcons)
 {
   string path = inputData.targetFolder + "/" + baseName + " Icon.asset";
   GenerateIconsWithMipLevels.EnsureFolderIsCreatedRecursively(Path.GetDirectoryName(path));
   Texture2D iconWithMipLevels = GenerateIconsWithMipLevels.CreateIconWithMipLevels(inputData, baseName, assetPathsOfAllIcons);
   if ((UnityEngine.Object) iconWithMipLevels == (UnityEngine.Object) null)
   {
     Debug.Log((object) "CreateIconWithMipLevels failed");
   }
   else
   {
     iconWithMipLevels.name = baseName + " Icon.png";
     AssetDatabase.CreateAsset((UnityEngine.Object) iconWithMipLevels, path);
     inputData.generatedFileNames.Add(path);
   }
 }
Пример #16
0
    private static void GenerateIconsWithMips(GenerateIconsWithMipLevels.InputData inputData)
    {
        List <string> iconAssetPaths = GenerateIconsWithMipLevels.GetIconAssetPaths(inputData.sourceFolder, inputData.mipIdentifier, inputData.mipFileExtension);

        if (iconAssetPaths.Count == 0)
        {
            Debug.LogWarning("No mip files found for generating icons! Searching in: " + inputData.sourceFolder + ", for files with extension: " + inputData.mipFileExtension);
        }
        string[] baseNames = GenerateIconsWithMipLevels.GetBaseNames(inputData, iconAssetPaths);
        string[] array     = baseNames;
        for (int i = 0; i < array.Length; i++)
        {
            string baseName = array[i];
            GenerateIconsWithMipLevels.GenerateIcon(inputData, baseName, iconAssetPaths);
        }
    }
    private static void GenerateIcon(GenerateIconsWithMipLevels.InputData inputData, string baseName, List <string> assetPathsOfAllIcons)
    {
        string path = inputData.targetFolder + "/" + baseName + " Icon.asset";

        GenerateIconsWithMipLevels.EnsureFolderIsCreatedRecursively(Path.GetDirectoryName(path));
        Texture2D iconWithMipLevels = GenerateIconsWithMipLevels.CreateIconWithMipLevels(inputData, baseName, assetPathsOfAllIcons);

        if ((UnityEngine.Object)iconWithMipLevels == (UnityEngine.Object)null)
        {
            Debug.Log((object)"CreateIconWithMipLevels failed");
        }
        else
        {
            iconWithMipLevels.name = baseName + " Icon.png";
            AssetDatabase.CreateAsset((UnityEngine.Object)iconWithMipLevels, path);
            inputData.generatedFileNames.Add(path);
        }
    }
    public static void GenerateAllIconsWithMipLevels()
    {
        GenerateIconsWithMipLevels.InputData inputData = new GenerateIconsWithMipLevels.InputData();
        inputData.sourceFolder     = GenerateIconsWithMipLevels.k_IconSourceFolder;
        inputData.targetFolder     = GenerateIconsWithMipLevels.k_IconTargetFolder;
        inputData.mipIdentifier    = "@";
        inputData.mipFileExtension = "png";
        if (AssetDatabase.GetMainAssetInstanceID(inputData.targetFolder) != 0)
        {
            AssetDatabase.DeleteAsset(inputData.targetFolder);
            AssetDatabase.Refresh();
        }
        GenerateIconsWithMipLevels.EnsureFolderIsCreated(inputData.targetFolder);
        float realtimeSinceStartup = Time.realtimeSinceStartup;

        GenerateIconsWithMipLevels.GenerateIconsWithMips(inputData);
        Debug.Log((object)string.Format("Generated {0} icons with mip levels in {1} seconds", (object)inputData.generatedFileNames.Count, (object)(float)((double)Time.realtimeSinceStartup - (double)realtimeSinceStartup)));
        GenerateIconsWithMipLevels.RemoveUnusedFiles(inputData.generatedFileNames);
        AssetDatabase.Refresh();
        InternalEditorUtility.RepaintAllViews();
    }
	private static void GenerateIcon(GenerateIconsWithMipLevels.InputData inputData, string baseName, List<string> assetPathsOfAllIcons)
	{
		string text = inputData.targetFolder + "/" + baseName + " Icon.asset";
		GenerateIconsWithMipLevels.EnsureFolderIsCreatedRecursively(Path.GetDirectoryName(text));
		Texture2D texture2D = GenerateIconsWithMipLevels.CreateIconWithMipLevels(inputData, baseName, assetPathsOfAllIcons);
		if (texture2D == null)
		{
			Debug.Log("CreateIconWithMipLevels failed");
			return;
		}
		texture2D.name = baseName + " Icon.png";
		AssetDatabase.CreateAsset(texture2D, text);
		inputData.generatedFileNames.Add(text);
	}
 private static Texture2D CreateIconWithMipLevels(GenerateIconsWithMipLevels.InputData inputData, string baseName, List<string> assetPathsOfAllIcons)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   GenerateIconsWithMipLevels.\u003CCreateIconWithMipLevels\u003Ec__AnonStorey39 levelsCAnonStorey39 = new GenerateIconsWithMipLevels.\u003CCreateIconWithMipLevels\u003Ec__AnonStorey39();
   // ISSUE: reference to a compiler-generated field
   levelsCAnonStorey39.baseName = baseName;
   // ISSUE: reference to a compiler-generated field
   levelsCAnonStorey39.inputData = inputData;
   // ISSUE: reference to a compiler-generated method
   List<string> all = assetPathsOfAllIcons.FindAll(new Predicate<string>(levelsCAnonStorey39.\u003C\u003Em__4F));
   List<Texture2D> texture2DList = new List<Texture2D>();
   using (List<string>.Enumerator enumerator = all.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       string current = enumerator.Current;
       Texture2D texture2D = GenerateIconsWithMipLevels.GetTexture2D(current);
       if ((UnityEngine.Object) texture2D != (UnityEngine.Object) null)
         texture2DList.Add(texture2D);
       else
         Debug.LogError((object) ("Mip not found " + current));
     }
   }
   int num1 = 99999;
   int num2 = 0;
   using (List<Texture2D>.Enumerator enumerator = texture2DList.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       int width = enumerator.Current.width;
       if (width > num2)
         num2 = width;
       if (width < num1)
         num1 = width;
     }
   }
   if (num2 == 0)
     return (Texture2D) null;
   Texture2D iconWithMips = new Texture2D(num2, num2, TextureFormat.ARGB32, true, true);
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   if (!GenerateIconsWithMipLevels.BlitMip(iconWithMips, levelsCAnonStorey39.inputData.GetMipFileName(levelsCAnonStorey39.baseName, num2), 0))
     return iconWithMips;
   iconWithMips.Apply(true);
   int mipResolution = num2;
   for (int mipLevel = 1; mipLevel < iconWithMips.mipmapCount; ++mipLevel)
   {
     mipResolution /= 2;
     if (mipResolution >= num1)
     {
       // ISSUE: reference to a compiler-generated field
       // ISSUE: reference to a compiler-generated field
       GenerateIconsWithMipLevels.BlitMip(iconWithMips, levelsCAnonStorey39.inputData.GetMipFileName(levelsCAnonStorey39.baseName, mipResolution), mipLevel);
     }
     else
       break;
   }
   iconWithMips.Apply(false, true);
   return iconWithMips;
 }
	private static Texture2D CreateIconWithMipLevels(GenerateIconsWithMipLevels.InputData inputData, string baseName, List<string> assetPathsOfAllIcons)
	{
		List<string> list = assetPathsOfAllIcons.FindAll((string o) => o.IndexOf(baseName + inputData.mipIdentifier) >= 0);
		List<Texture2D> list2 = new List<Texture2D>();
		foreach (string current in list)
		{
			Texture2D texture2D = GenerateIconsWithMipLevels.GetTexture2D(current);
			if (texture2D != null)
			{
				list2.Add(texture2D);
			}
			else
			{
				Debug.LogError("Mip not found " + current);
			}
		}
		int num = 99999;
		int num2 = 0;
		foreach (Texture2D current2 in list2)
		{
			int width = current2.width;
			if (width > num2)
			{
				num2 = width;
			}
			if (width < num)
			{
				num = width;
			}
		}
		if (num2 == 0)
		{
			return null;
		}
		Texture2D texture2D2 = new Texture2D(num2, num2, TextureFormat.ARGB32, true, true);
		if (GenerateIconsWithMipLevels.BlitMip(texture2D2, inputData.GetMipFileName(baseName, num2), 0))
		{
			texture2D2.Apply(true);
			int num3 = num2;
			for (int i = 1; i < texture2D2.mipmapCount; i++)
			{
				num3 /= 2;
				if (num3 < num)
				{
					break;
				}
				GenerateIconsWithMipLevels.BlitMip(texture2D2, inputData.GetMipFileName(baseName, num3), i);
			}
			texture2D2.Apply(false, true);
			return texture2D2;
		}
		return texture2D2;
	}
	private static string[] GetBaseNames(GenerateIconsWithMipLevels.InputData inputData, List<string> files)
	{
		string[] array = new string[files.Count];
		int length = inputData.sourceFolder.Length;
		for (int i = 0; i < files.Count; i++)
		{
			array[i] = files[i].Substring(length, files[i].IndexOf(inputData.mipIdentifier) - length);
		}
		HashSet<string> hashSet = new HashSet<string>(array);
		array = new string[hashSet.Count];
		hashSet.CopyTo(array);
		return array;
	}
 private static string[] GetBaseNames(GenerateIconsWithMipLevels.InputData inputData, List<string> files)
 {
   string[] strArray = new string[files.Count];
   int length = inputData.sourceFolder.Length;
   for (int index = 0; index < files.Count; ++index)
     strArray[index] = files[index].Substring(length, files[index].IndexOf(inputData.mipIdentifier) - length);
   HashSet<string> stringSet = new HashSet<string>((IEnumerable<string>) strArray);
   string[] array = new string[stringSet.Count];
   stringSet.CopyTo(array);
   return array;
 }
    private static Texture2D CreateIconWithMipLevels(GenerateIconsWithMipLevels.InputData inputData, string baseName, List <string> assetPathsOfAllIcons)
    {
        // ISSUE: object of a compiler-generated type is created
        // ISSUE: variable of a compiler-generated type
        GenerateIconsWithMipLevels.\u003CCreateIconWithMipLevels\u003Ec__AnonStorey39 levelsCAnonStorey39 = new GenerateIconsWithMipLevels.\u003CCreateIconWithMipLevels\u003Ec__AnonStorey39();
        // ISSUE: reference to a compiler-generated field
        levelsCAnonStorey39.baseName = baseName;
        // ISSUE: reference to a compiler-generated field
        levelsCAnonStorey39.inputData = inputData;
        // ISSUE: reference to a compiler-generated method
        List <string>    all           = assetPathsOfAllIcons.FindAll(new Predicate <string>(levelsCAnonStorey39.\u003C\u003Em__4F));
        List <Texture2D> texture2DList = new List <Texture2D>();

        using (List <string> .Enumerator enumerator = all.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                string    current   = enumerator.Current;
                Texture2D texture2D = GenerateIconsWithMipLevels.GetTexture2D(current);
                if ((UnityEngine.Object)texture2D != (UnityEngine.Object)null)
                {
                    texture2DList.Add(texture2D);
                }
                else
                {
                    Debug.LogError((object)("Mip not found " + current));
                }
            }
        }
        int num1 = 99999;
        int num2 = 0;

        using (List <Texture2D> .Enumerator enumerator = texture2DList.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                int width = enumerator.Current.width;
                if (width > num2)
                {
                    num2 = width;
                }
                if (width < num1)
                {
                    num1 = width;
                }
            }
        }
        if (num2 == 0)
        {
            return((Texture2D)null);
        }
        Texture2D iconWithMips = new Texture2D(num2, num2, TextureFormat.ARGB32, true, true);

        // ISSUE: reference to a compiler-generated field
        // ISSUE: reference to a compiler-generated field
        if (!GenerateIconsWithMipLevels.BlitMip(iconWithMips, levelsCAnonStorey39.inputData.GetMipFileName(levelsCAnonStorey39.baseName, num2), 0))
        {
            return(iconWithMips);
        }
        iconWithMips.Apply(true);
        int mipResolution = num2;

        for (int mipLevel = 1; mipLevel < iconWithMips.mipmapCount; ++mipLevel)
        {
            mipResolution /= 2;
            if (mipResolution >= num1)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                GenerateIconsWithMipLevels.BlitMip(iconWithMips, levelsCAnonStorey39.inputData.GetMipFileName(levelsCAnonStorey39.baseName, mipResolution), mipLevel);
            }
            else
            {
                break;
            }
        }
        iconWithMips.Apply(false, true);
        return(iconWithMips);
    }
Пример #25
0
 private static void RegenerateSelectedIconsWithMipLevels()
 {
     GenerateIconsWithMipLevels.GenerateSelectedIconsWithMips();
 }
Пример #26
0
 private static void RegenerateAllIconsWithMipLevels()
 {
     GenerateIconsWithMipLevels.GenerateAllIconsWithMipLevels();
 }