【m】框架优化
This commit is contained in:
@@ -234,17 +234,10 @@ namespace Stary.Evo.Editor
|
||||
using (FileStream zipStream = new FileStream(zipFilePath, FileMode.Create))
|
||||
using (ZipArchive archive = new ZipArchive(zipStream, ZipArchiveMode.Create))
|
||||
{
|
||||
// 指定需要压缩的后缀(例如:只压缩.json和.dll文件)
|
||||
//string[] targetExtensions = { ".bundle" };
|
||||
|
||||
// 遍历目录下所有文件
|
||||
// foreach (string filePath in Directory.GetFiles(outFilePath, "*.*", SearchOption.AllDirectories)
|
||||
// .Where(f => targetExtensions.Contains(Path.GetExtension(f),
|
||||
// StringComparer.OrdinalIgnoreCase)))
|
||||
foreach (string filePath in Directory.GetFiles(outFilePath, "*.*", SearchOption.AllDirectories))
|
||||
{
|
||||
// 获取文件在压缩包中的相对路径
|
||||
string entryName = Path.GetRelativePath(outFilePath, filePath);
|
||||
string entryName = $"{packageName}/{ Path.GetRelativePath(outFilePath, filePath)}";
|
||||
|
||||
// 创建zip条目
|
||||
ZipArchiveEntry entry = archive.CreateEntry(entryName,
|
||||
@@ -290,7 +283,7 @@ namespace Stary.Evo.Editor
|
||||
|
||||
public async Task UpdateFileDataResDomain(string zipFilePath)
|
||||
{
|
||||
string ip = EditorPrefs.GetString("ip");
|
||||
string ip = CustomEditorPrefs.GetString("ip");
|
||||
var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { zipFilePath });
|
||||
EditorUtility.DisplayProgressBar("提示", $"开始上传{packageName}(上传zip文件)", 0.5f);
|
||||
if (messageEntity.code == 200)
|
||||
@@ -363,7 +356,7 @@ namespace Stary.Evo.Editor
|
||||
DomainName = selectedPackageNames,
|
||||
Platform = EditorUserBuildSettings.activeBuildTarget.ToString(),
|
||||
};
|
||||
string ip = EditorPrefs.GetString("ip");
|
||||
string ip = CustomEditorPrefs.GetString("ip");
|
||||
var resResultMessage = await WebRequestSystem.Post(ip + "/ResDomain/GetResDomainByDomain",
|
||||
JsonConvert.SerializeObject(resDmainAddRequst));
|
||||
//如果低于服务器版本,更新版本号
|
||||
|
||||
Reference in New Issue
Block a user