Merge pull request #155 from minenice55/enum-bugfix

fix bug with non-sequential enum properties
This commit is contained in:
minenice55 2022-08-21 17:45:26 -04:00 committed by GitHub
commit 9ce9f42278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,7 @@ namespace HeavenStudio.Editor
dropdown.value = selected; dropdown.value = selected;
dropdown.onValueChanged.AddListener(_ => dropdown.onValueChanged.AddListener(_ =>
parameterManager.entity[propertyName] = Enum.ToObject(enumType, dropdown.value) parameterManager.entity[propertyName] = (int) enumVals.GetValue(dropdown.value)
); );
break; break;