- edited description
HashSet<string> fields with null values break all List<T> drawers in same inspector
When a HashSet<string> field is decorated with a ValueDropdown attribute and has a value of null, it breaks every List<T> drawer addition (+) button in the same inspector. Instead of opening correctly, clicking addition buttons prints the attached error. Replacing null value of the HashSet<string> field or completely hiding its drawer (with ShowIf or FoldoutGroup) fixes the problem. It’s likely that addition dropdown reuses some elements from value dropdown and presence of value dropdown HashSet<string> drawer somehow throws a wrench into things. Note that error can be influenced by whether problematic HashSet drawer is above or below affected List field, so make sure to test both possibilities.
Reproduction: Declare a class with any number of List<T> fields and a HashSet<string> field, decorate HashSet field with ValueDropdown attribute, make the field null, try clicking + button on Lists above and below the HashSet field, observe the error.
Unity version: 2019.4.1f1
Odin version: 2.1.12
Editor Only mode: No
OS: Windows 10 Pro 1903 x64
Comments (4)
-
reporter -
reporter - edited description
-
- changed status to resolved
I've confirmed the issue and implemented a fix. If you need a build with the fix you can contact me (Mikkel - Sirenix) on our Discord and I'll send one over.
Sorry for the trouble, and thanks for the report.
-
The Discord can be found here btw: https://discord.gg/WTYJEra
- Log in to comment