I am trying to implement a multi selection dropdown in game (not for editor) using new UI Toolkit. It turns out all the choices i have (other than ListView) are in UnityEditor.UIElements namespace e.g. MaskField whereas a simple dropdown doesn’t support multi selection. When is it going to be added to UnityEngine.UIElements or is there a workaround possible ![]()
I’d also love to see that kind of feature.
I’m creating a complex EditorWindow with GraphView and stuff to help my team create content faster while limiting mistakes (auto creation/modification/deletion of ScriptableObjects, jsons, …).
For that purpose I have a ScriptableObject which has a List<string> Tags = new(); that I modify on the fly.
When my team need a new tag, it’s just added to the list automatically, but then they should be able to have the selection in a DropDown.
Since it’s tags, we want to use multiple values at once. But currently only EnumFlagsField allow that, and i can’t use an Enum as i need values that changes dynamically based on a list.
There’s also a TagField, but it seems to be linked to the Editor GameObjects tags, and it also seems to not be able to use multiple values at once.
I’m confident that my situation is common, if you scrap the EditorWindow aspect and only think of the “tags” situation.
We would greatly benefit from an update in this area.
Side note: I say team but we’re really just 3 people working for fun.
I found the solution, it’s called a MaskField. I feel stupid now. Note that it only works in the Editor.