I want to test method using async method. But, when i run test, UnityEditor is blocking.
I think, this problem is because async method. i don't know how to solve this problem.
Unity version : Unity 2020.3.33f1
public async static Task<string> GetAsync() {
// Do something
HttpResponseMessage response = await request.GetAsync(..);
string responseData = await response.Content.ReadAsStringAsync();
return response Data
}
...
public string GetData() {
Task<string> res = GetAsync();
return res.Result;
}
////////////////// Test Code //////////////
[Test]
public void Test_GetData() {
...
string res = GetData()
...
}