public float GetItemHeight(int index) { var property = _valuesProperty.GetArrayElementAtIndex(index); switch (_itemDisplay) { case ListItemDisplayType.Normal: { return(EditorGUI.GetPropertyHeight(property)); } case ListItemDisplayType.Inline: { using (new EditorGUI.IndentLevelScope(1)) return(RectHelper.LineHeight + InlineDisplayDrawer.GetHeight(property)); } case ListItemDisplayType.Foldout: { using (new EditorGUI.IndentLevelScope(1)) { var expanded = IsExpanded(index); return(expanded ? RectHelper.LineHeight + InlineDisplayDrawer.GetHeight(property) : EditorGUIUtility.singleLineHeight); } } case ListItemDisplayType.AssetPopup: { return(AssetPopupDrawer.GetHeight()); } } return(0.0f); }
private float GetItemInlineHeight(int index) { var property = _property.GetArrayElementAtIndex(index); return(InlineDisplayDrawer.GetHeight(property)); }