Skip to content

Reorderable List

[ReorderableList] attribute used for drawing reorderable arrays/lists.


Support Types

Type Description Example
T[] Default C# array string[]
List<T> Collection generic List List<string>
Info

Where T is type of array elements.


Parameters

Parameter Name Description Arguments
ElementLabel Custom element name display format. {index} {niceIndex}
Draggable Set false to disable element drag function. None
DrawClearButton Set true to display button to clear all list elements. None

Examples

[ReorderableList]
public int[] values;

[ReorderableList(ElementLabel = "User Name: {niceIndex}", Draggable = false)]
public List<string> names;

[ReorderableList(ElementLabel = null, ClearButton = true)]
public Transform[] point;
Note

Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.

using ApexInspector;


Demo

using ApexInspector;
using UnityEngine;

public class ExampleComponent : MonoBehaviour
{
    [ReorderableList(ElementLabel = null, ClearButton = true)]
    public List<Transform> waypoints;
}

Live-demo

Live demo