protected override void DrawUnifiedElementInternal(Rect rect, T old_value) { if (EditorGUIExtensions.DropdownButton(GetElementRect(), old_value.ToStringEX("None"))) { List <T> options = GetOptions() .Sort(o => o.ToStringEX()) .ToList(); GenericMenuExtensions.Create <T>(options, o => GetProperty().SetContentValues(o)) .DropDown(GetElementRect()); } }
protected override void DrawUnifiedElementInternal(Rect rect, T old_value) { string old_text = old_value.ToStringEX("None"); string new_text = EditorGUI.DelayedTextField(GetElementRect(), old_text); if (new_text != old_text) { List <T> options = GetOptions(new_text) .Sort(o => o.ToStringEX().Length) .ToList(); if (options.HasOnlyOne()) { GetProperty().SetContentValues(options.GetOnly()); } else { GenericMenuExtensions.Create <T>(options.Prepend(default(T)), o => GetProperty().SetContentValues(o)) .DropDown(GetElementRect()); } } }