Skip to content

Reorderable Attribute Options

Jeiel Aranal edited this page Jul 5, 2017 · 2 revisions

Reorderable Attribute Options

Optional settings when using the Reorderable attribute that changes how the reorderable list is displayed.

Reorderable(string elementLabel, bool isZeroIndex=true, bool isSingleLine=false)

Element Label

Custom string for the element label

public class ListReorderTest : MonoBehaviour
{  
	[Reorderable("String")]
	public string[] stringArray; // Array elements listed as: "String 0"

	[Reorderable("Other String", isZeroIndex:false)]
	public List<string> stringList; // Array elements listed as: "Other String 1"
}

Custom Element Names

Is Zero Index

Does the array display start from 0?

Is Single Line

Force the element to be drawn as a single line in the list. Useful for serialized classes or structs that don't contain that many elements.

Clone this wiki locally