为什么在 Linux 上执行 GET 请求时 UnityWebRequest 返回未知错误?
/// <summary>
/// 获取题Json
/// </summary>
/// <returns></returns>
private IEnumerator GetTiDataJson()
{
//Debug.Log("获取题Json");
UnityWebRequest webRequest = UnityWebRequest.Get(Application.streamingAssetsPath + "/Data.json");
yield return webRequest.SendWebRequest();
if (webRequest.isHttpError || webRequest.isNetworkError)
Debug.Log(webRequest.error);
else
{
var ConfigInfo = JsonUtility.FromJson<TiData>(webRequest.downloadHandler.text).ConfigInfo;
Debug.Log(ConfigInfo [0].Title);
}
}
以上代码 其他 平台 使用没有问题,但是在 Linux 平台 就解析出错。
求指点一下嘛,
目前了解到UnityWebRequest.Get 在官方的支持平台没有看见 Linux 平台(是否不支持?)