UnityC#勉強してMMO作たいけどどうする!?5(^^at GAMEDEVUnityC#勉強してMMO作たいけどどうする!?5(^^ - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト704:でし 19/06/28 18:30:58.59 4S9OyDHb.net private IEnumerator Access() { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("id", InputText_.GetComponent<Text>().text); //インプットフィールドからidの取得); //複数phpに送信したいデータがある場合は今回の場合dic.Add("hoge", value)のように足していけばよい StartCoroutine(Post(ServerAddress, dic)); // POST yield return 0; } 705:名前は開発中のものです。 19/06/28 18:31:13.30 4S9OyDHb.net private IEnumerator Post(string url, Dictionary<string, string> post) { WWWForm form = new WWWForm(); foreach (KeyValuePair<string, string> post_arg in post) { form.AddField(post_arg.Key, post_arg.Value); } WWW www = new WWW(url, form); yield return StartCoroutine(CheckTimeOut(www, 3f)); //TimeOutSecond = 3s; if (www.error != null) { Debug.Log("HttpPost NG: " + www.error); //そもそも接続ができていないとき } else if (www.isDone) { //送られてきたデータをテキストに反映 ResultText_.GetComponent<Text>().text = www.text; } } 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch