I am performing a simple UnityWebRequest.Post, it works perfectly fine on PC and Android but not on iOS both in the editor and on the iOS device. Even with hard coded values, the WWWForm that is being sent to the PHP page is still null or empty. Again this is only a problem on iOS. Any ideas?
WWWForm Leaderboard= new WWWForm();
Leaderboard.AddField("score", highscore);
yield return new WaitForEndOfFrame();
using (UnityWebRequest www = UnityWebRequest.Post(score_PHP, Leaderboard))
{
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Success!: " + www.downloadHandler.text;
}
}
↧