From ca8d8b5145106f172494b44f64e5338394fac8e0 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 21 Aug 2022 17:40:40 -0400 Subject: [PATCH] fix bug with non-sequential enum properties --- Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs index 593b7f2c..99ef48e4 100644 --- a/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs +++ b/Assets/Scripts/LevelEditor/EventSelector/EventPropertyPrefab.cs @@ -172,7 +172,7 @@ namespace HeavenStudio.Editor dropdown.value = selected; dropdown.onValueChanged.AddListener(_ => - parameterManager.entity[propertyName] = Enum.ToObject(enumType, dropdown.value) + parameterManager.entity[propertyName] = (int) enumVals.GetValue(dropdown.value) ); break;