【发布时间】:2018-03-18 18:43:39
【问题描述】:
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour
{
public string result;
public Game game;
IEnumerator Start ()
{
WWW www = new WWW ("https://testing.azurewebsites.net/");
yield return www;
Debug.Log("WWW error is: " + web.error);
Debug.Log("WWW text is: " + web.text);
}
void OnGUI()
{
GUILayout.Label (result);
}
}
运行 UWP 构建时,两个日志语句都返回空结果。 但是,当从编辑器运行时,WWW 似乎工作得很好。 我在 appxmanifest 中检查了 Internet(Client)、Internet(Client&Server)、Private Networks(Client&Server) 以授予应用权限。
【问题讨论】: