質問編集履歴

6

コードを問題個所以外を少し修正いたしました

2021/10/20 11:33

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,8 @@
9
9
  該当ソースコード
10
10
 
11
11
  ```
12
+
13
+ {
12
14
 
13
15
  using UnityEngine;
14
16
 
@@ -38,6 +40,8 @@
38
40
 
39
41
  }
40
42
 
43
+ }
44
+
41
45
  }
42
46
 
43
47
  ```

5

改行を入れました。もしまだ改良の余地があるならばご指摘のほうをお願いいたします。

2021/10/20 11:33

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,37 +8,39 @@
8
8
 
9
9
  該当ソースコード
10
10
 
11
- ```using UnityEngine;
11
+ ```
12
12
 
13
- using System.Collections;
13
+ using UnityEngine;
14
14
 
15
- using System.Collections.Generic;
15
+ using System.Collections;
16
16
 
17
+ using System.Collections.Generic;
18
+
17
- using UnityEngine.UI;
19
+ using UnityEngine.UI;
18
20
 
19
21
 
20
22
 
21
- public class SelectableText :
23
+ public class SelectableText :
22
24
 
23
- Selectable
25
+ Selectable
24
26
 
25
27
  {
26
28
 
27
- public void
29
+ public void
28
30
 
29
- OnSelect(BaseEventData
31
+  OnSelect(BaseEventData eventData)
30
32
 
31
- eventData)
32
-
33
- {
33
+ {
34
34
 
35
35
  Debug.Log(${gameObject.name}
36
36
 
37
37
  が選択された");
38
38
 
39
- }
39
+ }
40
40
 
41
+ }
42
+
41
- }```
43
+ ```
42
44
 
43
45
 
44
46
 

4

2021/10/20 11:26

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -10,13 +10,11 @@
10
10
 
11
11
  ```using UnityEngine;
12
12
 
13
- using System.Collections;
13
+ using System.Collections;
14
14
 
15
- using
15
+ using System.Collections.Generic;
16
16
 
17
- System.Collections.Generic;
18
-
19
- using UnityEngine.UI;
17
+ using UnityEngine.UI;
20
18
 
21
19
 
22
20
 
@@ -32,11 +30,13 @@
32
30
 
33
31
  eventData)
34
32
 
35
- {
33
+ {
36
34
 
37
- Debug.Log($" {gameObject.name}が選択された");
35
+ Debug.Log(${gameObject.name}
38
36
 
37
+ が選択された");
38
+
39
- }
39
+ }
40
40
 
41
41
  }```
42
42
 

3

2021/10/19 10:42

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  該当ソースコード
10
10
 
11
- ‘‘‘using UnityEngine;
11
+ ```using UnityEngine;
12
12
 
13
13
  using System.Collections;
14
14
 
@@ -38,7 +38,7 @@
38
38
 
39
39
  }
40
40
 
41
- }‘‘‘
41
+ }```
42
42
 
43
43
 
44
44
 

2

2021/10/19 10:40

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  該当ソースコード
10
10
 
11
- "using UnityEngine;
11
+ ‘‘‘using UnityEngine;
12
12
 
13
13
  using System.Collections;
14
14
 
@@ -38,7 +38,7 @@
38
38
 
39
39
  }
40
40
 
41
- }"
41
+ }‘‘‘
42
42
 
43
43
 
44
44
 

1

2021/10/19 10:38

投稿

Toto63
Toto63

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,38 +8,46 @@
8
8
 
9
9
  該当ソースコード
10
10
 
11
- using UnityEngine;
11
+ "using UnityEngine;
12
12
 
13
- using System.Collections;
13
+ using System.Collections;
14
14
 
15
- using System.Collections.Generic;
15
+ using
16
16
 
17
+ System.Collections.Generic;
18
+
17
- using UnityEngine.UI;
19
+ using UnityEngine.UI;
18
20
 
19
21
 
20
22
 
21
- public class SelectableText : Selectable
23
+ public class SelectableText :
22
24
 
23
- {
25
+ Selectable
24
26
 
27
+ {
28
+
29
+ public void
30
+
25
- public void OnSelect(BaseEventData eventData)
31
+ OnSelect(BaseEventData
32
+
33
+ eventData)
26
34
 
27
35
  {
28
36
 
29
- Debug.Log($"{gameObject.name}が選択された");
37
+ Debug.Log($" {gameObject.name}が選択された");
30
38
 
31
- }
39
+ }
32
40
 
33
- }
41
+ }"
34
42
 
35
43
 
36
44
 
37
45
  エラーメッセージ
38
46
 
39
- error CS0246: The type or namespace name 'BaseEventData' could not be found (are you missing a using directive or an assembly reference?)
47
+ "error CS0246: The type or namespace name 'BaseEventData' could not be found (are you missing a using directive or an assembly reference?)"
40
48
 
41
49
 
42
50
 
43
51
  ツールのバージョン
44
52
 
45
- Unity 2020.3.16f1
53
+ "Unity 2020.3.16f1"