daily pastebin goal
88%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IEnumerator Update_GI_Score_FORM()
  2.  {
  3.      WWWForm form = new WWWForm();
  4.      form.AddField("myField", "myData");
  5.      Game game = Singleton.GameInstance;
  6.      foreach (Score s in game.scores)
  7.      {
  8.          form.AddField("name", s.Name);
  9.          form.AddField("value", s.rate.ToString());
  10.      }
  11.      var url = RequestController.Instance.baseURL + "atualiza_score";
  12.      UnityWebRequest www = UnityWebRequest.Post(url, form);
  13.      yield return www.SendWebRequest();
  14.      if (www.isNetworkError || www.isHttpError)
  15.      {
  16.          Debug.Log(www.error);
  17.      }
  18.      else
  19.      {
  20.          Debug.Log("Form upload complete!");
  21.      }
  22.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top