[ReferenceArray]
Displays an array of SerializeReference elements with a type selection dropdown.
Support Types
T[]
Array of elements
List<T>
List of elements
Parameters
DropdownTitle
string
Title of dropdown search window.
ArrayNaming
bool
Use classical element naming like in arrays.
UniqueTypes
bool
Disallow duplicate element runtime types in the array. When enabled, each element must have a unique concrete type.
OnGUI
void OnElementGUI(Rect position, SerializedProperty property, GUIContent label)
Override array element GUI.
GetHeight
float GetElementHeight(SerializedProperty array, int index)
Override array element height.
GetLabel
GUIContent GetElementLabel(SerializedProperty array, int index)
Override array element label.
OnAdd
void OnAdd(SerializedProperty array, int index)
Callback on add new element. Called after adding new element.
OnRemove
void OnRemove(SerializedProperty array, int index)
Callback on remove selected element. Called before removing selected element.
OnReorder
void OnReorder(SerializedProperty array)
Callback on reorder array list. Called after list has been reordered.
TypeFilter
bool ValidateType(Type type)
Filter out the types that can be used to create an instance.
IncludeTypes
Type[]
Static filter of types that can be used to create an instance.
ExcludeTypes
Type[]
Static filter of types that cannot be used to create an instance.
HideFoldoutWhenEmpty
bool
When true and the array is empty, the foldout header arrow and label are hidden. The header container and add button remain visible.
ShowCount
bool
When true, the count of the array is shown in the header.
Examples
Last updated