はじめに
「Reorderable List」は、Unity 標準よりも便利で使いやすい ReorderableList です
使用例
使い方
using Malee; using System; using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { public List<ExampleChild> list1; [Reorderable] public ExampleChildList list2; [Reorderable] public ExampleChildList list3; [Reorderable] public StringList list4; [Reorderable] public VectorList list5; [Serializable] public class ExampleChild { public string name ; public float value ; } [Serializable] public class ExampleChildList : ReorderableArray<ExampleChild> { } [Serializable] public class StringList : ReorderableArray<string> { } [Serializable] public class VectorList : ReorderableArray<Vector4> { } }
上記のようなコードを記述して使用します