public IEnumerator IESendScoreToDatabase(string name, int score, AddScoreToLeaderboardMenu sender) { WWWForm form = new WWWForm(); form.AddField("action", "addScore"); form.AddField("name", name); form.AddField("score", score); WWW www = new WWW(m_Link, form); yield return(www); ScoreAddedResponse response = JsonUtility.FromJson <ScoreAddedResponse>(www.text); sender.ReactToServerResponse(response); }
public void SendScoreToDatabase(string name, int score, AddScoreToLeaderboardMenu sender) { StartCoroutine(IESendScoreToDatabase(name, score, sender)); }