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;
	}