【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));
|
||||
//如果低于服务器版本,更新版本号
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Stary.Evo
|
||||
else
|
||||
{
|
||||
ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig;
|
||||
EditorPrefs.SetString("ip", ip);
|
||||
CustomEditorPrefs.SetString("ip", ip);
|
||||
userName = hotfixMainResDomain.hotfixMainResDomainEntity.username;
|
||||
password = hotfixMainResDomain.hotfixMainResDomainEntity.password;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace Stary.Evo
|
||||
{
|
||||
buildAssetType = BuildAssetType.Login;
|
||||
message = "未登录";
|
||||
EditorPrefs.DeleteKey("Authorization");
|
||||
CustomEditorPrefs.DeleteKey("Authorization");
|
||||
}
|
||||
|
||||
private void SetWebRequestInfo()
|
||||
@@ -107,7 +107,7 @@ namespace Stary.Evo
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig = ip;
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.username = userName;
|
||||
hotfixMainResDomain.hotfixMainResDomainEntity.password = password;
|
||||
EditorPrefs.SetString("ip", ip);
|
||||
CustomEditorPrefs.SetString("ip", ip);
|
||||
EditorUtility.SetDirty(hotfixMainResDomain);
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.staryevo.buildoriginality",
|
||||
"version": "1.0.13",
|
||||
"version": "1.1.0",
|
||||
"displayName": "00.StaryEvo.BuildOriginality",
|
||||
"description": "美术打包工具",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user