回答編集履歴
2
サンプルコードの Start メソッドに Debug.Log を追加
test
CHANGED
@@ -88,6 +88,8 @@
|
|
88
88
|
|
89
89
|
{
|
90
90
|
|
91
|
+
Debug.Log("Start() : point = " + this.point);
|
92
|
+
|
91
93
|
this.pointText = GameObject.Find("Point");
|
92
94
|
|
93
95
|
}
|
1
サンプルコードを変更
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
```c#
|
8
8
|
|
9
|
-
|
9
|
+
sing System.Collections;
|
10
10
|
|
11
11
|
using System.Collections.Generic;
|
12
12
|
|
@@ -30,9 +30,11 @@
|
|
30
30
|
|
31
31
|
{
|
32
32
|
|
33
|
+
Debug.Log("get100() before : point = " + this.point);
|
34
|
+
|
33
35
|
this.point += 100;
|
34
36
|
|
35
|
-
Debug.Log("get100() : point = " + this.point);
|
37
|
+
Debug.Log("get100() after : point = " + this.point);
|
36
38
|
|
37
39
|
}
|
38
40
|
|
@@ -42,9 +44,11 @@
|
|
42
44
|
|
43
45
|
{
|
44
46
|
|
47
|
+
Debug.Log("get500() before : point = " + this.point);
|
48
|
+
|
45
49
|
this.point += 500;
|
46
50
|
|
47
|
-
Debug.Log("get500() : point = " + this.point);
|
51
|
+
Debug.Log("get500() after : point = " + this.point);
|
48
52
|
|
49
53
|
}
|
50
54
|
|
@@ -54,9 +58,11 @@
|
|
54
58
|
|
55
59
|
{
|
56
60
|
|
61
|
+
Debug.Log("get1000() before : point = " + this.point);
|
62
|
+
|
57
63
|
this.point += 1000;
|
58
64
|
|
59
|
-
Debug.Log("get1000() : point = " + this.point);
|
65
|
+
Debug.Log("get1000() after : point = " + this.point);
|
60
66
|
|
61
67
|
}
|
62
68
|
|
@@ -66,9 +72,11 @@
|
|
66
72
|
|
67
73
|
{
|
68
74
|
|
75
|
+
Debug.Log("get5000() before : point = " + this.point);
|
76
|
+
|
69
77
|
this.point += 5000;
|
70
78
|
|
71
|
-
Debug.Log("get5000() : point = " + this.point);
|
79
|
+
Debug.Log("get5000() after : point = " + this.point);
|
72
80
|
|
73
81
|
}
|
74
82
|
|
@@ -92,11 +100,13 @@
|
|
92
100
|
|
93
101
|
{
|
94
102
|
|
103
|
+
Debug.Log("Update() before : point = " + this.point);
|
104
|
+
|
95
105
|
this.pointText.GetComponent<Text>().text =
|
96
106
|
|
97
107
|
this.point.ToString() + " point";
|
98
108
|
|
99
|
-
Debug.Log("Update() : point = " + this.point);
|
109
|
+
Debug.Log("Update() after : point = " + this.point);
|
100
110
|
|
101
111
|
}
|
102
112
|
|