|
@@ -47,6 +47,10 @@ namespace GFGEditor
|
|
public static string DressUpTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/DressUp/";
|
|
public static string DressUpTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/DressUp/";
|
|
public static string DressUpMd5FileSaveName = "DressUpMd5";
|
|
public static string DressUpMd5FileSaveName = "DressUpMd5";
|
|
|
|
|
|
|
|
+ private static string[] NpcFaceSrcPaths { get { return new string[] { ResRootPath + "npc/对话表情/" }; } }
|
|
|
|
+ public static string NpcFaceTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/Npc/Face/";
|
|
|
|
+ public static string NpcFacepMd5FileSaveName = "NpcFaceMd5";
|
|
|
|
+
|
|
private static string[] NpcHeadSrcPaths { get { return new string[] { ResRootPath + "npc/对战头像/" }; } }
|
|
private static string[] NpcHeadSrcPaths { get { return new string[] { ResRootPath + "npc/对战头像/" }; } }
|
|
public static string NpcHeadTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/Npc/Head/";
|
|
public static string NpcHeadTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/Npc/Head/";
|
|
public static string NPCHeadMd5FileSaveName = "NpcHeadMd5";
|
|
public static string NPCHeadMd5FileSaveName = "NpcHeadMd5";
|
|
@@ -159,6 +163,11 @@ namespace GFGEditor
|
|
public static string MiniGameMergeTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/MiniGame/MergeGame/";
|
|
public static string MiniGameMergeTargetPath = $"{ResPathUtil.TEXTURE_DIR_PATH}/MiniGame/MergeGame/";
|
|
public static string MiniGameMergeMd5FileSaveName = "MiniGameMergeMd5";
|
|
public static string MiniGameMergeMd5FileSaveName = "MiniGameMergeMd5";
|
|
|
|
|
|
|
|
+ public static void Test()
|
|
|
|
+ {
|
|
|
|
+ ImportClip(NpcFaceSrcPaths, NpcFaceTargetPath, NpcFacepMd5FileSaveName);
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void Import()
|
|
public static void Import()
|
|
{
|
|
{
|
|
var md5Path = ImportArtResTool.Md5FilePath;
|
|
var md5Path = ImportArtResTool.Md5FilePath;
|
|
@@ -187,7 +196,10 @@ namespace GFGEditor
|
|
ImportRes(ItemIconSrcPaths, ItemIconTargetPath, IconMd5FileSaveName);
|
|
ImportRes(ItemIconSrcPaths, ItemIconTargetPath, IconMd5FileSaveName);
|
|
// 换装部件
|
|
// 换装部件
|
|
EditorUtility.DisplayProgressBar("进度", "正在裁减换装部件", 1);
|
|
EditorUtility.DisplayProgressBar("进度", "正在裁减换装部件", 1);
|
|
- ImportClipImage();
|
|
|
|
|
|
+ ImportClip(DressUpSrcPaths, DressUpTargetPath, DressUpMd5FileSaveName);
|
|
|
|
+ // NPC对话表情
|
|
|
|
+ EditorUtility.DisplayProgressBar("进度", "正在裁减NPC对话表情", 1);
|
|
|
|
+ ImportClip(NpcFaceSrcPaths, NpcFaceTargetPath, NpcFacepMd5FileSaveName);
|
|
//NPC头像
|
|
//NPC头像
|
|
EditorUtility.DisplayProgressBar("进度", "正在导入NPC头像", 1);
|
|
EditorUtility.DisplayProgressBar("进度", "正在导入NPC头像", 1);
|
|
ImportRes(NpcHeadSrcPaths, NpcHeadTargetPath, NPCHeadMd5FileSaveName);
|
|
ImportRes(NpcHeadSrcPaths, NpcHeadTargetPath, NPCHeadMd5FileSaveName);
|
|
@@ -308,12 +320,7 @@ namespace GFGEditor
|
|
return files;
|
|
return files;
|
|
}
|
|
}
|
|
|
|
|
|
- public static void ImportClipImage()
|
|
|
|
- {
|
|
|
|
- ImportClip(DressUpSrcPaths, DressUpTargetPath);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static void ImportClip(string[] sourceDirs, string targetDir)
|
|
|
|
|
|
+ public static void ImportClip(string[] sourceDirs, string targetDir, string md5FileName)
|
|
{
|
|
{
|
|
//换装部件
|
|
//换装部件
|
|
if (!Directory.Exists(targetDir))
|
|
if (!Directory.Exists(targetDir))
|
|
@@ -321,7 +328,7 @@ namespace GFGEditor
|
|
Directory.CreateDirectory(targetDir);
|
|
Directory.CreateDirectory(targetDir);
|
|
}
|
|
}
|
|
Dictionary<string, string> sourceImageMD5 = new Dictionary<string, string>();
|
|
Dictionary<string, string> sourceImageMD5 = new Dictionary<string, string>();
|
|
- sourceImageMD5 = ImagesClip.ReadSourceImagesMD5(DressUpMd5FileSaveName);
|
|
|
|
|
|
+ sourceImageMD5 = ImagesClip.ReadSourceImagesMD5(md5FileName);
|
|
|
|
|
|
foreach (string dir in sourceDirs)
|
|
foreach (string dir in sourceDirs)
|
|
{
|
|
{
|
|
@@ -339,7 +346,7 @@ namespace GFGEditor
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ImagesClip.WriteSourceImagesMD5(sourceImageMD5, DressUpMd5FileSaveName);
|
|
|
|
|
|
+ ImagesClip.WriteSourceImagesMD5(sourceImageMD5, md5FileName);
|
|
AssetDatabase.Refresh();
|
|
AssetDatabase.Refresh();
|
|
}
|
|
}
|
|
|
|
|