An attempt to mimic the ReorderableList within Unity while adding some extended functionality.
This extension can be installed using Unity package manager.
https://github.com/cfoulston/Unity-Reorderable-List.git
Package manager UI
Manifest
{
"dependencies": {
"com.malee.reorderablelist": "https://github.com/cfoulston/Unity-Reorderable-List.git"
}
}
A standalone version is available under the standalone branch, although this version is no longer maintained.
There are two ways to use the ReorderableList
Pagination can be enabled in two ways:
[Reorderable(paginate = true, pageSize = 0)]
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"
Surrogates can be created to facilitate adding Objects to a ReorderableList that don't match the ReorderableList type. This can be achieved in two ways:
[Reorderable(surrogateType = typeof(ObjectType), surrogateProperty = "objectProperty")]
list.surrogate = new ReorderableList.Surrogate(typeof(ObjectType), Callback);
Check the SurrogateTest
and SurrogateTestEditor
examples for more information
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。