Hi All,
A created a local webserver with Python on port 80 and a simple code to test my connection @
When I use my app inside my Editor on Windows with Unity 2018.3.1f1, the connection works fine , when I tried to use in my mobile fone with Android 9, I receive the Unknown Error .
I opened the chrome browser in my phone and I connected without problems to my local web server 192.168.15.10.
I have no ideia about this problem !
Follow my code :
private string url = “192.168.15.10”;
private IEnumerator DoDownload()
{
using (WWW webRequest = new WWW(url))
{
yield return webRequest;
if (!string.IsNullOrEmpty(webRequest.error))
{
Debug.Log (webRequest.error);
}
else
{
Debug.Log (“Connect OK”);
}
}
}
I also tried the follow code below :
private string url = “192.168.15.10”;
using (UnityWebRequest webRequest = new UnityWebRequest(url))
{
yield return webRequest.SendWebRequest();
if (webRequest.isHttpError||webRequest.isNetworkError)
{
Debug.Log (webRequest.error);
}
else
{
Debug.Log (“Connect OK”);
}
}
Thanks