static bool Draw(List <object> values, GUIContent content) { EditorGUILayout.BeginVertical(); var listName = content.text; var prevPath = InspectorUtility.Path; InspectorUtility.AddFolder(listName); var changed = false; EditorGUILayout.BeginHorizontal(); var foldout = InspectorUtility.DrawTabAndFoldout(content); var added = false; var deleted = false; changed = DrawAddDelete(0, ref added, ref deleted, false); if (changed) { InspectorUtility.Foldout(true); } EditorGUILayout.EndHorizontal(); if (changed == false && foldout) { var tmpValues = new List <object>(values); for (int i = 0; i < tmpValues.Count; ++i) { changed |= DrawElement(tmpValues, i); } } InspectorUtility.Path = prevPath; EditorGUILayout.EndVertical(); return(changed); }
public static void Expand() { InspectorUtility.Foldout(true, null, InspectorUtility.SelectedPath); }
public static void CollapseAll() { InspectorUtility.Foldout(false, null, InspectorUtility.SelectedPath, true); }