Assert.AreEqual(property.propertyType, SerializedPropertyType.Integer); var integerField = new IntegerField { bindingPath = property.propertyPath, style = { display = new StyleEnum<DisplayStyle>(DisplayStyle.None) } }; container.Add(integerField); var popupField = new PopupField<EnumTest>(property.displayName, Enum.GetValues(typeof(EnumTest)).Cast<EnumTest>().ToList(), property.intValue); popupField.RegisterValueChangedCallback(e => { var newValue = (int)(object) e.newValue; if (property.intValue == newValue) return; property.intValue = newValue; property.serializedObject.ApplyModifiedProperties(); }); container.Add(popupField); integerField.RegisterValueChangedCallback(e => { var newValue = (EnumTest)(object) e.newValue; popupField.SetValueWithoutNotify(newValue); }); return container; } 51