質問編集履歴
1
質問内容の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
ステージ1からステージ2にシーン移動した時、アイテムスロットに設定されてあるアイテムをVボタンでドロップするという処理を作りました。
|
2
2
|
するとエラーが起き、ネットで調べてみるとnullを使う必要があるとだけ書いてあったのですがどこにそれを追加すれば良いのかわかりません。
|
3
3
|
|
4
|
+
|
4
5
|
```public class EquipSetImage1 : MonoBehaviour
|
5
6
|
{
|
6
7
|
GameObject equipimagecolor;
|
@@ -141,6 +142,11 @@
|
|
141
142
|
|
142
143
|
```
|
143
144
|
```
|
145
|
+
エラーが起きた場所
|
146
|
+
Instantiate(Soard, UnityChan.transform.position + new Vector3(0f, 1f, 0f), UnityChan.transform.rotation);
|
147
|
+
コード
|
148
|
+
```
|
149
|
+
```
|
144
150
|
エラー内容
|
145
151
|
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
|
146
152
|
Your script should either check if it is null or you should not destroy the object.
|