private void MakeNoteList() { List <MidiEvent> tmpList = sequence.GetList() [0].GetEventList(); for (int i = 0; i < tmpList.Count; i++) { if (!tmpList [i].GetStatus()) { for (int j = 0; j < tmpList [i].GetNoteList().Count; j++) { GameObject tmpNote = Instantiate(Resources.Load <GameObject>("Prefabs/Note")) as GameObject; tmpNote.GetComponent <Note> ().KeyNum = tmpList [i].GetNoteList() [j]; tmpNote.GetComponent <Note> ().delta = tmpList [i].GetDelta(); NoteList.Add(tmpNote.GetComponent <Note> ()); paper.AddNoteToPaper(tmpNote.GetComponent <Note> ()); } } } for (int i = 0; i < NoteList.Count; i++) { NoteList [i].SetLine(this, i); //NoteList [i].PrintDebug (i); } paper.SetXScale(NoteList [NoteList.Count - 1].transform.localPosition.x, XOffset); }