private void GUIItem(ref ItemEnum item) { item.name = EditorGUILayout.TextField(item.name); EditorGUILayout.Space(50.0f); item.number = EditorGUILayout.IntField(item.number); }
private void AddItem(Rect rect) { int count = _list.count; ItemEnum newItem = new ItemEnum(); newItem.number = count == 0 ? 0 : _list[count - 1].number + 1; newItem.name = "Item" + newItem.number; _list.AddItem(newItem); }