mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Utility.Unity Unity6下过时API修正
This commit is contained in:
@@ -43,7 +43,11 @@ namespace TEngine
|
|||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
cts.CancelAfterSlim(TimeSpan.FromSeconds(timeout));
|
cts.CancelAfterSlim(TimeSpan.FromSeconds(timeout));
|
||||||
|
|
||||||
|
#if UNITY_6000_0_OR_NEWER
|
||||||
|
using UnityWebRequest unityWebRequest = UnityWebRequest.PostWwwForm(url, postData);
|
||||||
|
#else
|
||||||
using UnityWebRequest unityWebRequest = UnityWebRequest.Post(url, postData);
|
using UnityWebRequest unityWebRequest = UnityWebRequest.Post(url, postData);
|
||||||
|
#endif
|
||||||
return await SendWebRequest(unityWebRequest, cts);
|
return await SendWebRequest(unityWebRequest, cts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user