I'm trying to emulate Tag-like behavior using Odin. Currently I'm doing the following.
[ValueDropdown("GetPositionIDs")] [Tooltip("The ID of the position you want to change to.")] public string DesiredPosition;
I would like to constrain DesiredPosition to a proper value of the List<string> returned from ValueDropdown, and this also means adding a default for it to start at. I've looked all over and I can't seem to find anything about it. To be clearer about the requirements I'm looking for...
-If DesiredPosition is "", which is what it is at the start, get the list above and set it to item 0. -Check if DesiredPosition's value is on the list. If it is not, set it to the default value, item 0.
I could do this via code, but I believe both of these things should be part of the ValueDropdown attribute, or another attribute designed to work with ValueDropdown. Thank you for your time.