public void AddProperty(InspectableProperty property) { // Check if this property actually belongs to the same direct child if (!property.GetRootPath().Equals(Parent)) { return; } if (extendListIndex.ContainsKey(property.PropertyPath)) { return; } InspectableReorderableList propList = new InspectableReorderableList( property.InspectableObject.SerializedObject, property, draggable: true, displayHeader: false, displayAddButton: true, displayRemoveButton: true) { headerHeight = 5 }; propList.drawElementBackgroundCallback = delegate(Rect position, int index, bool active, bool focused) { if (DrawBackgroundCallback != null) { Rect backgroundRect = new Rect(position); if (index <= 0) { backgroundRect.yMin -= 8; } if (index >= propList.count - 1) { backgroundRect.yMax += 3; } EditorGUI.DrawRect(backgroundRect, DrawBackgroundCallback(active, focused)); } else { propList.drawElementBackgroundCallback = null; } }; propList.drawElementCallback = delegate(Rect position, int index, bool active, bool focused) { var iterProp = property.GetArrayElementAtIndex(index); var displayName = new GUIContent(iterProp.DisplayName); if (ElementNameCallback != null) { var elementName = ElementNameCallback(index); displayName = elementName == null ? GUIContent.none : new GUIContent(elementName); } EasyGUI.TryDrawInspectableObject(position, iterProp, displayName, IsDrawObjectReference); }; propList.elementHeightCallback = index => ElementHeightCallback(property, index); extendListIndex.Add(property.PropertyPath, propList); }