[Request] Multiselect dropdown with different than enum types
See original GitHub issueThis is effectively mixing [EnumFlags]
with [Dropdown]
like support.
Use case:
I need to create list of strings, where each string comes from a given (not known in compile time, but known in editor - so I cannot use enum) pool and each string can only appear once.
Example:
[MultiDropdown("GetVectorValues")]
public List<Vector3> AllowedDirections; // I can select more than one,
// but each one at most once
private DropdownList<Vector3> GetVectorValues()
{
return new DropdownList<Vector3>()
{
{ "Right", Vector3.right },
{ "Left", Vector3.left },
{ "Up", Vector3.up },
{ "Down", Vector3.down },
{ "Forward", Vector3.forward },
{ "Back", Vector3.back }
};
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Multi select drop down list for enum
In my question I mean that I want to get multiselect dropdown list with single return value. It was just the example of...
Read more >How to select multiple values from enum in a dropdown?
Hi, In my application, I have one enum with five values. Now I want to select multiple values from the dropdown. How can...
Read more >Order by query optimization for multi select data (enum)
Below is an example of how you can return the ordered list using your new structure. What is missing from the database design...
Read more >Multiple enum select from inspector
Hi guys I'm quite new to c# and trying to get my head round the use of enums , I'm currently using a...
Read more >Populating a List/Multi-Select Field from the API
With the API, I've noticed I cannot define values in a multi-select field that have not already been created, hence when I attempt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for MultiDropdown - “make Dropdown* support collection fields” feature. I’m using code from “In the meantime, you can achieve it like this”, and added a CustomPropertyDrawer for that inner class to get rid of unnecessary Folding in the Editor, as it’s basically one field class:
This is cool, I will implement it. In the meantime, you can achieve it like this. I haven’t tested this code, but it should work.