質問編集履歴
1
スクリプトを改変しエラーをなくしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,9 +34,11 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
public class Fl
|
37
|
+
public class FlashController : MonoBehaviour
|
38
38
|
|
39
39
|
{
|
40
|
+
|
41
|
+
private Image img;
|
40
42
|
|
41
43
|
// Start is called before the first frame update
|
42
44
|
|
@@ -46,7 +48,7 @@
|
|
46
48
|
|
47
49
|
GameObject img = GameObject.Find("Image");
|
48
50
|
|
49
|
-
img.color = Color
|
51
|
+
img.GetComponent<Image>().color = new Color (1f, 1f, 1f, 0f);
|
50
52
|
|
51
53
|
}
|
52
54
|
|
@@ -66,7 +68,7 @@
|
|
66
68
|
|
67
69
|
{
|
68
70
|
|
69
|
-
img.color = new Color(0.5f, 0f, 0f, 0.5f);
|
71
|
+
img.GetComponent<Image>().color = new Color(0.5f, 0f, 0f, 0.5f);
|
70
72
|
|
71
73
|
}
|
72
74
|
|
@@ -74,7 +76,7 @@
|
|
74
76
|
|
75
77
|
{
|
76
78
|
|
77
|
-
img.color = Color.Lerp(img.color, Color.clear, Time.deltaTime);
|
79
|
+
img.GetComponent<Image>().color = Color.Lerp(img.color, Color.clear, Time.deltaTime);
|
78
80
|
|
79
81
|
}
|
80
82
|
|
@@ -84,11 +86,11 @@
|
|
84
86
|
|
85
87
|
}
|
86
88
|
|
89
|
+
```
|
87
90
|
|
88
91
|
|
89
|
-
```
|
90
92
|
|
91
|
-
|
93
|
+
無事compileできるのですが、画面が赤くフラッシュしません。
|
92
94
|
|
93
95
|
|
94
96
|
|