【m】111
This commit is contained in:
@@ -112,14 +112,6 @@ namespace Stary.Evo.Editor
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// [Title("加密列表", titleAlignment: TitleAlignments.Centered)]
|
||||
// [HorizontalGroup("BuildPipeline"), HideLabel]
|
||||
// [ValueDropdown("GetEncryptionServices")]
|
||||
// [OnValueChanged("SetEncryptionServices")]
|
||||
// public Type encryption;
|
||||
|
||||
|
||||
|
||||
[HideLabel] public AbstractBuildPipelineViewer viewer;
|
||||
|
||||
@@ -227,23 +219,6 @@ namespace Stary.Evo.Editor
|
||||
_viewers.Add(selectedBuildPipelines, viewer);
|
||||
}
|
||||
}
|
||||
|
||||
// private List<Type> GetEncryptionServices()
|
||||
// {
|
||||
// var encryptionClassTypes = EditorTools.GetAssignableTypes(typeof(IEncryptionServices));
|
||||
// if (encryption.IsNull())
|
||||
// {
|
||||
// encryption = encryptionClassTypes[0];
|
||||
// }
|
||||
//
|
||||
// return encryptionClassTypes;
|
||||
// }
|
||||
//
|
||||
// private void SetEncryptionServices()
|
||||
// {
|
||||
// AssetBundleBuilderSetting.SetPackageEncyptionClassName(packageName, selectedBuildPipelines,
|
||||
// encryption.FullName);
|
||||
// }
|
||||
}
|
||||
|
||||
public enum VersionPosType
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Stary.Evo
|
||||
/// <param name="url">获取Token值的服务URL地址(很重要)</param>
|
||||
/// <param name="postData">传入请求的参数,此处参数为JOSN格式</param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ResultMessageEntity> PostFile(string url, string[] path)
|
||||
public static async Task<ResultMessageEntity> PostFile(string url, string[] path,Action<float> uploadProgress = null)
|
||||
{
|
||||
if (!GetTokenState())
|
||||
{
|
||||
@@ -174,7 +174,18 @@ namespace Stary.Evo
|
||||
webRequest.disposeDownloadHandlerOnDispose = true;
|
||||
webRequest.disposeCertificateHandlerOnDispose = true;
|
||||
webRequest.timeout = 60;
|
||||
await webRequest.SendWebRequest();
|
||||
|
||||
// 发送请求但不等待完成
|
||||
var operation = webRequest.SendWebRequest();
|
||||
// 轮询获取上传进度
|
||||
while (!operation.isDone)
|
||||
{
|
||||
// 调用进度回调函数
|
||||
uploadProgress?.Invoke(webRequest.uploadProgress);
|
||||
// 等待一帧,避免阻塞
|
||||
await UniTask.Yield();
|
||||
}
|
||||
|
||||
webRequest.uploadHandler?.Dispose();
|
||||
// 更新错误检查方式
|
||||
if (webRequest.result == UnityWebRequest.Result.ConnectionError ||
|
||||
|
||||
Reference in New Issue
Block a user