【发布时间】:2020-10-03 08:57:19
【问题描述】:
我对在 Oculus Go 中使用时的 UnityWebRequest 有疑问。 UnityWebRequest 在 UnityEditor 中运行良好。但是,UnityWebRequest 在 Oculus Go 中不起作用......似乎只是没有连接到 http url,因为没有登录 putty。
IEnumerator GetArt()
{
WWWForm form = new WWWForm();
form.AddField("galleryidx", 1);
Debug.Log("get art");
string Url = "http://[awsIPaddress]/vr/enterGallery";
UnityWebRequest request = UnityWebRequest.Post(Url, form);
request.chunkedTransfer = false;
yield return request.SendWebRequest();
if (request.isNetworkError)
{
//show message "no internet "
Debug.Log("no internet");
}
else
{
if (request.isDone)
{
Debug.Log("getting image");
Debug.Log(request.downloadHandler.text);
//using JsonHelper to get json data
allPosts = JsonHelper.getJsonArray<Post>(request.downloadHandler.text);
StartCoroutine(GetArtsImages());
}
}
}
我们的团队确实想解决这个问题,但是没有错误消息,所以我们不知道是什么导致了这个问题。有什么想法可以解决它吗?我们正在使用统一 2018.4.15f1。
我们还阅读了类似的帖子 (https://forum.unity.com/threads/unitywebrequest-not-working-for-oculus-quest.830199/) 并修改了 AndroidManifest...但还是一样。
谢谢。
【问题讨论】:
标签: unity3d oculusgo unitywebrequest