Commit a85ffae8 authored by xiaoye's avatar xiaoye

Update SettingServant.cs

parent 1c9f195a
Pipeline #39614 failed with stages
......@@ -236,11 +236,21 @@ namespace MDPro3.Servant
StartCoroutine(DownloadYpkAsync(url));
}
public class AcceptAllCertificates : CertificateHandler
{
protected override bool ValidateCertificate(byte[] certificateData)
{
return true;
}
}
private IEnumerator DownloadYpkAsync(string url)
{
downloadingYPK = true;
using var request = UnityWebRequest.Get(url);
request.certificateHandler = new AcceptAllCertificates();
request.SendWebRequest();
while (!request.isDone)
{
......@@ -261,6 +271,7 @@ namespace MDPro3.Servant
MessageManager.Cast(InterString.Get("下载失败。"));
GetUI<SettingServantUI>().ButtonDownloadYPK.SetModeText(string.Empty);
downloadingYPK = false;
request.certificateHandler.Dispose();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment