提交 82e0a3df 编写于 作者: T tanghai

修复安卓9.0中UnityWebReuquestAsync无效的问题

上级 3eacbdaa
using System;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;
namespace ETModel
......@@ -17,6 +14,16 @@ namespace ETModel
public class UnityWebRequestAsync : Component
{
public class AcceptAllCertificate: CertificateHandler
{
protected override bool ValidateCertificate(byte[] certificateData)
{
return true;
}
}
public static AcceptAllCertificate certificateHandler = new AcceptAllCertificate();
public UnityWebRequest Request;
public bool isCancel;
......@@ -88,6 +95,7 @@ namespace ETModel
url = url.Replace(" ", "%20");
this.Request = UnityWebRequest.Get(url);
this.Request.certificateHandler = certificateHandler;
this.Request.SendWebRequest();
return this.tcs.Task;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册