質問編集履歴
3
編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -41,5 +41,5 @@
|
|
41
41
|
### 解決コード。
|
42
42
|
|
43
43
|
```C#
|
44
|
-
Player
|
44
|
+
Player myPlayer = Instantiate(player);
|
45
45
|
```
|
2
余分なもの削除。
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,11 +33,6 @@
|
|
33
33
|
}
|
34
34
|
}
|
35
35
|
```
|
36
|
-
|
37
|
-
CubeにPlayerスクリプトをアタッチしてプレハブ化。
|
38
|
-
GameManagerをシーン上のオブジェクトにアタッチ。
|
39
|
-
GameManagerのインスペクタで、PlayerにプレハブのCubeをセット。
|
40
|
-
|
41
36
|
エラーメッセージ。
|
42
37
|
```
|
43
38
|
Assets/GameManager.cs(12,31): error CS0165: Use of unassigned local variable `player'
|
1
解決コード追記。
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,8 +43,8 @@
|
|
43
43
|
Assets/GameManager.cs(12,31): error CS0165: Use of unassigned local variable `player'
|
44
44
|
```
|
45
45
|
|
46
|
-
|
46
|
+
### 解決コード。
|
47
47
|
|
48
|
-
|
48
|
+
```C#
|
49
|
-
|
49
|
+
Player myplayer = Instantiate(player);
|
50
|
-
|
50
|
+
```
|