So I am getting issues with my login/registration system when deploying to Android. If I run it in Unity it works just fine. But when I run it in Android I keep getting Unknown Error when submitting POST requests to my PHP back-end. This is coming from parsing www.error. www.text comes back empty. So I simplified the code to test, and I STILL get Unknown Error even with this super simple code. Any ideas?
Clickme.cs
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public class Clickme : MonoBehaviour
{
public Text Result;
public void OnClick()
{
StartCoroutine(RunScript());
}
IEnumerator RunScript()
{
WWW www = new WWW("http://www.familypolaris.com/helloWorld.php");
yield return www;
if (www.text == "")
Result.text = "Result was empty, error: " + www.error;
else
Result.text = www.text;
}
}
helloWorld.php
<?php
echo "Hello World!";
?>