Unity WWW class can connect to outside servers, but cannot connect to localhost.
I have a crossdomain.xml in the localhost root.
It is the PHP.EXE built in web server. It does work with other browsers. Unity 5.3.0f4
Can you help me why it doesn’t work?
`
public class AppManager : MonoBehaviour {
public string url = "http://localhost";
public Text Result;
public Text Error;
void Start() {
StartCoroutine(CallURL());
}
IEnumerator CallURL() {
WWW www = new WWW(url);
print("www started");
yield return www;
print(www.error);
print(www.text);
Result.text = www.text;
Error.text = www.error;
}
}
`