https://github.com/caphosra/easyreorderablelist
You can easily use ReorderableList in Unity. This will improve the design and efficiency of the Unity editor extension!
https://github.com/caphosra/easyreorderablelist
easy-reorderablelist unity unity-editor unity-extension
Last synced: about 1 month ago
JSON representation
You can easily use ReorderableList in Unity. This will improve the design and efficiency of the Unity editor extension!
- Host: GitHub
- URL: https://github.com/caphosra/easyreorderablelist
- Owner: caphosra
- License: mit
- Created: 2018-03-31T10:56:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T05:10:33.000Z (about 8 years ago)
- Last Synced: 2025-01-10T19:56:50.931Z (over 1 year ago)
- Topics: easy-reorderablelist, unity, unity-editor, unity-extension
- Language: C#
- Homepage:
- Size: 37.1 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EasyReorderableList
You can easily use ReorderableList. This will improve the design and efficiency of the editor extension!
## Description
The ReorderableList that exists in the UnityEditorInternal namespace is very useful as an array representation when writing Editor extension code. However, it is hard to use for those who use it for the first time.
By using this, you can easily and quickly create ReorderableList.
## Demo

``` C#
private EasyReorderableList easyList;
public override void OnInspectorGUI()
{
var Target = target as TestScriptable;
//Create new EasyReorderableList instance.
if(easyList == null) easyList = new EasyReorderableList("i", Target.i, Draw);
//Draw
easyList.DoLayoutList();
//Save
EditorUtility.SetDirty(Target);
}
//DrawFunction
public int Draw(Rect rect, int data, bool isActive, bool isFocused)
{
return EditorGUI.IntField(rect, "int", data);
}
```
## Usage
1. Import EasyReorderableList.
2. Write ```using CPRUnitySystem;```
3. Create instance
``` C#
easyList = new EasyReorderableList([ListTitle], [Array], [DrawFunction]);
```
4. Draw EasyReorderableList
``` C#
easyList.DoLayoutList();
// or reorderableList.DoList([Rect]);
```
5. Run EditorUtility.SetDirty
``` C#
EditorUtility.SetDirty([Target]);
```
## Install
1. Download it => [ReleasePage](https://github.com/capra314cabra/EasyReorderableList/releases)
2. Import this into your unity project (If you download DLL file, you should create plugins folder.)
## Requirement
UnityEditorInternal namespace and UnityEditor namespace(Only when UNITY_EDITOR is defined)
## Contribution
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create new Pull Request
## Licence
[MIT Licence](https://github.com/capra314cabra/EasyReorderableList/blob/master/LICENSE)
## Author
[capra314cabra](https://github.com/capra314cabra)