回答編集履歴

3

コードを修正

2017/09/29 13:15

投稿

IShix
IShix

スコア1724

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  {
18
18
 
19
- request.method = UnityWebRequest.kHttpVerbGET;
19
+ request.method = UnityWebRequest.kHttpVerbGET;
20
20
 
21
21
  request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
22
22
 
@@ -26,15 +26,19 @@
26
26
 
27
27
 
28
28
 
29
+ if((int)request.responseCode < 299
30
+
29
- if((int)request.responseCode < 299 && (int)request.responseCode >= 200)
31
+ && (int)request.responseCode == 200
32
+
33
+ && !string.IsNullOrEmpty(request.downloadHandler.text))
30
34
 
31
35
  {
32
36
 
33
37
  var myID = request.downloadHandler.text;
34
38
 
35
- //ここでIDを保存
39
+ //ここでIDを保存
36
40
 
37
- }
41
+ }
38
42
 
39
43
  }
40
44
 

2

誤字訂正

2017/09/29 13:15

投稿

IShix
IShix

スコア1724

test CHANGED
@@ -92,7 +92,7 @@
92
92
 
93
93
 
94
94
 
95
- //ランダムIDを生成
95
+ //ランダムIDを生成
96
96
 
97
97
  function randomID($length = 10)
98
98
 

1

修正

2017/09/29 13:09

投稿

IShix
IShix

スコア1724

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- **UNITY**
7
+ **UNITY コードは未検証です**
8
8
 
9
9
  ```C#
10
10
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  {
18
18
 
19
- request.method = UnityWebRequest.kHttpVerbPOST;
19
+ request.method = UnityWebRequest.kHttpVerbGET;
20
20
 
21
21
  request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
22
22