Skip to content

Commit dea9fd3

Browse files
committed
Fixed issue with Enum fields
1 parent 1e2b357 commit dea9fd3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Editor/Editors/Drawers/ShaderPropertyDrawer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
5050

5151
var propType = GetPropertyTypeFromSerializedProperty(type.stringValue);
5252

53+
enumField.Init(propType);
54+
5355
enumField.value = propType;
5456

5557
enumField.RegisterValueChangedCallback(e =>

Editor/Editors/Drawers/VariablePropertyDrawer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public override VisualElement CreatePropertyGUI(SerializedProperty property)
3333
nameField.RegisterValueChangedCallback(evt => foldout.text = evt.newValue);
3434
var typeField = template.Q<EnumField>("Type");
3535
var customTypeField = template.Q<VisualElement>("CustomType");
36+
37+
typeField.Init(VariableType.Float);
3638

3739
customTypeField.style.display = ((VariableType)typeField.value) == VariableType.Custom ? DisplayStyle.Flex : DisplayStyle.None;
3840

0 commit comments

Comments
 (0)