From a10eea6e4ce647061813519d5b0ea496f29495b9 Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期四, 09 八月 2018 09:47:08 +0800
Subject: [PATCH] 同步最新svn内容
---
Assets/Editor/Tool/TextureMipMaps.cs | 84 +++++++++++++++++++++---------------------
1 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/Assets/Editor/Tool/TextureMipMaps.cs b/Assets/Editor/Tool/TextureMipMaps.cs
index 1946bb2..b68c761 100644
--- a/Assets/Editor/Tool/TextureMipMaps.cs
+++ b/Assets/Editor/Tool/TextureMipMaps.cs
@@ -5,51 +5,51 @@
using System.IO;
using System;
-public class TextureMipMaps
-{
+public class TextureMipMaps
+{
static string rootPath = Application.dataPath + "/Art";
[MenuItem("绋嬪簭/鍘婚櫎mipmaps")]
- public static void MipMapsSetting()
- {
- var fileInfoes = FileExtersion.GetFileInfos(rootPath, new string[] { "*.jpg", "*.png", "*.tga", "*.psd" });
-
- var index = 0;
- var count = fileInfoes.Count;
-
- foreach (var fileInfo in fileInfoes)
- {
- try
- {
- var path = fileInfo.FullName;
- path = path.Replace("\\", "/");
- var importerPath = StringUtility.Contact("Assets", path.Replace(Application.dataPath, ""));
-
- var importer = AssetImporter.GetAtPath(importerPath) as TextureImporter;
-
- if (importer != null)
- {
- importer.mipmapEnabled = false;
- AssetDatabase.ImportAsset(importerPath);
- EditorUtility.SetDirty(importer);
- }
-
- EditorUtility.DisplayProgressBar("绉婚櫎Mipmaps", importerPath, index / (float)count);
- }
- catch (Exception ex)
- {
- Debug.Log(ex);
- }
- finally
- {
- index++;
- }
- }
-
- EditorUtility.ClearProgressBar();
-
- AssetDatabase.Refresh();
- AssetDatabase.SaveAssets();
+ public static void MipMapsSetting()
+ {
+ var fileInfoes = FileExtersion.GetFileInfos(rootPath, new string[] { "*.jpg", "*.png", "*.tga", "*.psd" });
+
+ var index = 0;
+ var count = fileInfoes.Count;
+
+ foreach (var fileInfo in fileInfoes)
+ {
+ try
+ {
+ var path = fileInfo.FullName;
+ path = path.Replace("\\", "/");
+ var importerPath = StringUtility.Contact("Assets", path.Replace(Application.dataPath, ""));
+
+ var importer = AssetImporter.GetAtPath(importerPath) as TextureImporter;
+
+ if (importer != null)
+ {
+ importer.mipmapEnabled = false;
+ AssetDatabase.ImportAsset(importerPath);
+ EditorUtility.SetDirty(importer);
+ }
+
+ EditorUtility.DisplayProgressBar("绉婚櫎Mipmaps", importerPath, index / (float)count);
+ }
+ catch (Exception ex)
+ {
+ Debug.Log(ex);
+ }
+ finally
+ {
+ index++;
+ }
+ }
+
+ EditorUtility.ClearProgressBar();
+
+ AssetDatabase.Refresh();
+ AssetDatabase.SaveAssets();
}
--
Gitblit v1.8.0