My build works great, updates the SQL Datatable in standalone build and in Unity3D when editing just fine. When I build for web and have it uploaded onto my website, zgprogramming.net, it will not load the datatable at all. Basically it returns a null value for the string therefore my sorting function doesn’t work. I even gave the exe to my friend through Dropbox and he has no issue, adding his name to the high score or viewing it. I have the crossdomain.xml file saved in the root folder and don’t receive any errors at all. I am very frustrated and have searched and searched trying to resolve this issue. Here are the SaveScore and LoadScore functions.
IEnumerator SaveScores(string playerName) {
WWWForm form = new WWWForm();
form.AddField("gameMode", gameMode);
form.AddField("newName", playerName);
form.AddField("newScore", playerScore);
WWW webRequest = new WWW(saveUrl, form);
yield return webRequest;
StartCoroutine(LoadScores());
}
IEnumerator LoadScores() {
WWWForm form = new WWWForm();
form.AddField("gameMode", gameMode);
WWW webRequest = new WWW(loadUrl, form);
yield return webRequest;
namesArr.Clear ();
scoresArr.Clear ();
scoresLoaded = true;
if(string.IsNullOrEmpty(webRequest.text) == false) CreateArray(webRequest.text);
}