mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Utility.Unity Unity6下过时API修正
This commit is contained in:
@@ -43,7 +43,11 @@ namespace TEngine
|
||||
var cts = new CancellationTokenSource();
|
||||
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);
|
||||
#endif
|
||||
return await SendWebRequest(unityWebRequest, cts);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user