質問編集履歴

3

間違っていたところを修正してアップしていた

2018/06/26 02:04

投稿

shimazu
shimazu

スコア38

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  void Start(){
30
30
 
31
- string path = "/Users/xxxxxxxxxxxxxx/TestPOSTAPI/Assets/Resources/dummy01.png";
31
+ string path = "file:/Users/xxxxxxxxxxxxxx/TestPOSTAPI/Assets/Resources/dummy01.png";
32
32
 
33
33
  byte[] body = readPngFile(path);
34
34
 

2

MacなのでC不要

2018/06/26 02:04

投稿

shimazu
shimazu

スコア38

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  void Start(){
30
30
 
31
- string path = "C:/Users/xxxxxxxxxxxxxx/TestPOSTAPI/Assets/Resources/dummy01.png";
31
+ string path = "/Users/xxxxxxxxxxxxxx/TestPOSTAPI/Assets/Resources/dummy01.png";
32
32
 
33
33
  byte[] body = readPngFile(path);
34
34
 

1

コードの修正

2018/06/26 01:56

投稿

shimazu
shimazu

スコア38

test CHANGED
File without changes
test CHANGED
@@ -18,19 +18,21 @@
18
18
 
19
19
 
20
20
 
21
- using System;
21
+ using UnityEngine;
22
22
 
23
23
  using System.IO;
24
24
 
25
- using System.Text;
26
25
 
27
- using System.Collections;
28
26
 
29
- using System.Collections.Generic;
27
+ public class TestScript : MonoBehaviour {
30
28
 
31
- using UnityEngine;
29
+ void Start(){
32
30
 
31
+ string path = "C:/Users/xxxxxxxxxxxxxx/TestPOSTAPI/Assets/Resources/dummy01.png";
32
+
33
- using UnityEngine.Networking;
33
+ byte[] body = readPngFile(path);
34
+
35
+ }
34
36
 
35
37
 
36
38
 
@@ -48,9 +50,9 @@
48
50
 
49
51
  }
50
52
 
51
- }
53
+ }
52
54
 
53
-
55
+ }
54
56
 
55
57
  ```
56
58