エラーでNullReferenceExceptionがでてな何をなお直したらいいのか分からないためおし教えていただけると嬉しいです
エラーのメッセージは
Object reference not set to an instance of object NotesCreater.Awake()(at Assets/Script/NotesCreater.cs.18
間違えているコードは
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NotesCreater:MonoBehavior{
private CSVReader csvReader();
private List<List<string> MAP =new List<List<string>>();
private float time;
public GameObject Notes;
private GameObject notesParent;
private GameObject lostPosition;
private GameObject dedestination;
private int Line =0;
public int Selector =0;
private void Awake();
{
notesParent=gameObject.transform.parent.gameObject;
destination=GameObject.Find(notesParent.name+”/TapPosition”);
lostPosition=GameObject.Find(notesParent.name+”/lostPosition”);
Selector =int.Parse(notesParent.name.Replace(”NotesLine”,””));
MAP = csvReader.readCSV(”CSV”);
}
private void Update()
{
time +=Time.deltaTime;
if(time>=float.Parse(MAP[Line][Selector])==1)
{
NotesCreate();
}
Line++;
}
}
private void NotesCreate()
{
var notes = (GameObject)Instantiate(Notes,notesParent.transform);
notes.GetComponent<Nothutime>().
destination=destination;
notes.GetComponent<Nothutime>().
lostPosition=lostPosition;
notes.transform.localPosition=this.transform
.localPosition;
notes.transform.localRotation=this.transform
.localRotation;
notes.transform.localScale=new Vector3(2.426666f,2.381463f, 0
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。