【问题标题】:UnityWebRequest doesn't work in Oculus GoUnityWebRequest 在 Oculus Go 中不起作用
【发布时间】: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


    【解决方案1】:

    我们刚刚解决了。 unity project android manifest 文件不包含 &lt;uses-permission android:name="android.permission.INTERNET" /&gt;。我们还在构建设置中将构建系统更改为内部。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-27
      • 2019-02-24
      • 1970-01-01
      • 2019-08-30
      • 2018-11-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多