public static void Show (SerializedProperty list, EditorListOption options = EditorListOption.Default) {
if
(!list.isArray) {
EditorGUILayout.HelpBox(list.name +
" is neither an array nor a list!"
, MessageType.Error);
return
;
}
bool
showListLabel = (options & EditorListOption.ListLabel) != 0,
showListSize = (options & EditorListOption.ListSize) != 0;
if
(showListLabel) {
EditorGUILayout.PropertyField(list);
EditorGUI.indentLevel += 1;
}
if
(!showListLabel || list.isExpanded) {
if
(showListSize) {
EditorGUILayout.PropertyField(list.FindPropertyRelative(
"Array.size"
));
}
ShowElements(list, options);
}
if
(showListLabel) {
EditorGUI.indentLevel -= 1;
}
}