[RELEASED] [v1.5] Reorderable Arrays in Inspector - available in Asset Store

Hello Everyone!

After some work, improving and bug fixing I decided to release my Editor Extensions to the Asset Store. :sunglasses:

This editor extension will improve your workflow with arrays in the inspector. It works out of the box and can even be used with custom inspectors. It replaces the default inspector arrays with a reorderable version. As soon as you install the Asset into your project, all inspector arrays will upgrade. I hope you like this editor extension and it will save you time. :slight_smile:

Info: It also supports drag’n’drop and other features like the default arrays. If you have an array property which you wouldn’t like to be reorderable, you could simply give it the attribute [NotReorderable].

User Guide: ReorderableArrays.pdf

Feedback: I would love to hear your feedback and feature requests!

History:
Version 1.5 (12/10/2016) bugfix NullReferenceException
Version 1.4 (11/30/2016) bugfix with nested reorderable arrays
Version 1.3 (10/18/2016) nested reorderable arrays
Version 1.2 (09/26/2016) null pointer bug fix
Version 1.1 (09/20/2016) some improvements
Version 1.0 (09/14/2016) first release

I wanted to mention that projects that use a custom editor which uses the attribute like this:

[CustomEditor(typeof(MonoBehaviour), true, isFallback = true)]

will interfere with ReorderableArrayEditor. This will have the effect, that arrays appear as always and not reorderable. To resolve this issue, simply change your custom editor to extend ReorderableArrayEditor.

Example:

using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(MonoBehaviour), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorTest : ReorderableArrayEditor {

    public override void OnInspectorGUI() {
        DrawDefaultInspector();
    }
}

See this document to get more info and a coding reference.

Version 1.2 just released: fixes some bugs with null pointer exceptions.

Version 1.3 just released:

  • nested arrays: enable nested reorderable arrays via menu

Version 1.4 just released:

  • fixed a bug, when nested arrays were enabled
  • package has been submitted using Unity 5.3.0, and 5.4.2 to improve compatibility within the range of these versions of Unity.

Hi Robert,

It doesn’t work properly in Unity 5.5.0f3, it works at start but after hitting da Play Button or changing a Scene the Party is Over. When restarting Unity again it works again until Play is pressed or the Scene is changed…

Not a big problem for me because I want to use it only to change the order of some some fields in scrollers every now and then so I deleted your Asset and can Import it when I need it but this is not how it’s ment to be…

In my case I just need a way to change the order of some scroller “fields” fast…
I used Advanced Inspector in the past but that Asset is OverKill and not always Up to Date with a new Unity Release…
I use the TextAreaAttribute because the fields are different in size and I want to see it compact in the inspector…

[TextArea(1,16)]
public string[ ] scrollerText;

I bought your Asset because the price is close to zero but would never bought it for more because of the dll file…
Why don’t you release it as full source, we can change some things ourselfs if needed, I don’t like a dll file to be able to mess with scripts I don’t want. For this reason I also would prefer a [Reordable] Attribute instead of a [NotReorderable]…

Anyway, the idea is great and simple, the price and docs are good, drop the dll and I will rate it 5 stars…

Cheers,
Franco Palmieri - Fronne

Unity 5.4.3p1 same problem in your own Demo Scene…
Works once, After Play or Scene Changed a NullReferenceException shows up trying to reorder again:

NullReferenceException: SerializedObject has been Disposed
UnityEditorInternal.ReorderableList.DoDraggingAndSelection (Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:698)
UnityEditorInternal.ReorderableList.DoListElements (Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:556)
UnityEditorInternal.ReorderableList.DoLayoutList () (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:373)
UnityEditor.ReorderableArrayEditor.DrawReorderableArray (UnityEditor.SerializedProperty property)
UnityEditor.ReorderableArrayEditor.DrawProperty (UnityEditor.SerializedProperty property, Boolean drawReorderableArrays)
UnityEditor.ReorderableArrayEditor.DrawDefaultInspector ()
UnityEditor.ReorderableArrayEditor.OnInspectorGUI ()
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
UnityEditor.DockArea:OnGUI()

Hey Fronne, thank you for your report. I will look into that and report back!

1 Like

The bug has been fixed and a new version is in review.

1 Like

Works perfect now, Thnx!

Super, I’m glad I could help!

1 Like

Hi,
I just purchased your plugin and it’s not working for me in Unity 5.5.0f3. I loaded up the demo scene and am not seeing any way to reorder any of the lists in the ArrayTest GO. Pressed play and no errors or anything showed up.

Sorry for late reply, I was on vacation…

Please test in a new project and have a look at the menu “Tools|Reorderable Arrays” to enable and disable.

Same here as beeboks…? What does the demo is supposed to demo ??? Very intriguing…

Does this support System.Collection.Generic.List or just arrays?

It supports both.

1 Like

It shows the reorderable arrays in the inspector if you select the objects wich contain lists

Hello
How can I edit or access by code an array created with eeste assets?
For example if I want to change by code the

GameObject of the PLAYER 1 “Classic Player List”

???

Regards!!

Does this work with Unity 5.6? I had created my own similar reorderable lists, but it stopped working in 5.6. I don’t feel like taking the time to try and fix it, so looking for an alternative.

Yes, it still works with 5.6 and with 2017