An attempt to mimic the ReorderableList within Unity while adding some extended functionality.
- Drag and Drop references (like array inspector)
- Expandable items and list itself
- Multiple selection (ctrl/command, shift select)
- Draggable selection
- Context menu items (revert values, duplicate values, delete values)
- Custom attribute which allows automatic list generation for properties*
- Event delegates and custom styling
- Pagination
- Sorting (sort based on field, ascending and descending)
There are two ways to use the ReorderableList
- Create a custom Editor for your class and create a ReorderableList pointing to your serializedProperty
- Create custom list class which extends from ReorderableArray, assign [Reorderable] attribute above property (not class).
Pagination can be enabled in two ways:
- With the [Reorderable] attribute:
[Reorderable(paginate = true, pageSize = 0)]
- Properties of the ReorderableList:
list.paginate
list.pageSize
pageSize
defines the desired elements per page. Setting pageSize = 0
will enable the custom page size GUI
When enabled, the ReorderableList GUI will display a small section below the header to facilitate navigating the pages
Elements can be moved between pages by right-clicking and selecting "Move Array Element"