void OnGUI() { GUILayout.BeginVertical(); scrollPos = GUILayout.BeginScrollView(scrollPos, false, false); GUILayout.BeginVertical(); foreach (SequenceObject sequence in sequences) { GUILayout.BeginHorizontal(); sequence.id = EditorGUILayout.TextField(sequence.id); sequence.color = EditorGUILayout.ColorField(sequence.color); if (GUILayout.Button("Edit")) { SequenceEditor.ShowEditor(sequences.IndexOf(sequence)); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndScrollView(); if (GUILayout.Button("New")) { SequenceObject sO = new SequenceObject(); sO.id = "Sequence " + (sequences.Count + 1); sequences.Add(sO); Save(); } GUILayout.FlexibleSpace(); if (GUILayout.Button("Save")) { Save(); } GUILayout.EndVertical(); }