/// <summary> /// 遍历压缩所有zip文件 /// </summary> /// <returns>The zips.</returns> /// <param name="outpath">Outpath.</param> public static List <string> PackZips(string outpath) { List <string> finalZipFiles = new List <string>(); var allDirs = AssetDatabase.GetAllAssetPaths().Where(path => (Directory.Exists(path))); foreach (var path in allDirs) { UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(path, typeof(UnityEngine.Object)); if (QAssetBundleTool.HasQABLabel(obj, QAssetBundleTool.LABEL_ZIP)) { PackFiles(outpath + "/" + Path.GetFileName(path) + ".zip", path); finalZipFiles.Add(outpath + "/" + Path.GetFileName(path) + ".zip"); } } return(finalZipFiles); }
/// <summary> /// 遍历复制所有标记了file的文件 /// </summary> /// <returns>The point files.</returns> /// <param name="outpath">Outpath.</param> public static List <string> PackQFiles(string outpath) { List <string> finalMarkedFiles = new List <string>(); var allFiles = AssetDatabase.GetAllAssetPaths().Where(path => (File.Exists(path))); List <string> files = new List <string>(); foreach (var k in allFiles) { UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath(k, typeof(UnityEngine.Object)); if (QAssetBundleTool.HasQABLabel(obj, QAssetBundleTool.LABEL_FILE)) { files.Add(k); FileUtil.ReplaceFile(k, outpath + "/" + Path.GetFileName(k)); finalMarkedFiles.Add(outpath + "/" + Path.GetFileName(k)); } } return(finalMarkedFiles); }