图片提交
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5ad6874b82545ed4a9035e95cc295a71
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
@ -1196,19 +1196,11 @@ namespace Assets.Scripts.Editor.LanguageTool
|
|||
{
|
||||
SortingImage(enFileName, "Assets/ManagedResources/ArtFont_en/", "Assets/ManagedResources/ArtFont_en/" + dirName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(enPath + enFileName);
|
||||
}
|
||||
|
||||
if (File.Exists(viPath + viFileName))
|
||||
{
|
||||
SortingImage(viFileName, "Assets/ManagedResources/ArtFont_vi/", "Assets/ManagedResources/ArtFont_vi/" + dirName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(viPath + viFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
AssetDatabase.SaveAssets();
|
||||
|
@ -1245,5 +1237,50 @@ namespace Assets.Scripts.Editor.LanguageTool
|
|||
{
|
||||
AssetDatabase.MoveAsset(oldPath + fileName, newPath + "/" + fileName);
|
||||
}
|
||||
[MenuItem("LanguageTool/artFont/整理图片")]
|
||||
private static void SortingImageWith_zh()
|
||||
{
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>();
|
||||
Dictionary<string, string> zhDic = new Dictionary<string, string>();
|
||||
string[] files = Directory.GetFiles(Environment.CurrentDirectory + "/Assets/ManagedResources", "*.png", SearchOption.AllDirectories);
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
string _ex = Path.GetExtension(files[i]);
|
||||
//if ((!_ex.Contains("png"))||(!_ex.Contains("jpg")))
|
||||
//{
|
||||
// Debug.Log(files[i]);
|
||||
// continue;
|
||||
//}
|
||||
string fileName = Path.GetFileNameWithoutExtension(files[i]);
|
||||
EditorUtility.DisplayProgressBar(string.Format("整理图片:{0}/{1}", i, files.Length), fileName, (float)i / files.Length);
|
||||
if (fileName.EndsWith("_zh"))
|
||||
{
|
||||
string key = fileName.Substring(0, fileName.Length - 3);
|
||||
zhDic.Add(key, files[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
dic.Add(fileName, files[i]);
|
||||
}
|
||||
}
|
||||
foreach (KeyValuePair<string, string> keyValue in dic)
|
||||
{
|
||||
if (zhDic.ContainsKey(keyValue.Key))
|
||||
{
|
||||
|
||||
File.Delete(keyValue.Value);
|
||||
}
|
||||
}
|
||||
foreach (KeyValuePair<string, string> keyValue in zhDic)
|
||||
{
|
||||
var pathRoot = Directory.GetParent(keyValue.Value);
|
||||
if (!pathRoot.Name.Contains("ArtFont"))
|
||||
{
|
||||
Debug.LogError("错误文件夹的图片:" + keyValue.Value);
|
||||
}
|
||||
}
|
||||
Debug.Log("完成");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|