|
|
|
|
|
|
var field = new UIntField |
|
|
|
{ |
|
|
|
label = property.displayName, |
|
|
|
bindingPath = property.propertyPath, |
|
|
|
//Binding does not work on this custom UI Element field that we have created, so we need to use the change event
|
|
|
|
field.RegisterValueChangedCallback(evt => |
|
|
|
{ |
|
|
|
field.value = evt.newValue; |
|
|
|
|
|
|
|
|
|
|
// Create a surrogate integer field to detect and pass along external change events on the UIntField.
|
|
|
|
// UIElements currently does not support default change detection on non-SerializedProperty supported types.
|
|
|
|
// Create a surrogate integer field to detect and pass along external change events (non UI event) on the underlying serialized property.
|
|
|
|
surrogateField.style.display = new StyleEnum<DisplayStyle>(DisplayStyle.None); |
|
|
|
surrogateField.style.display = DisplayStyle.Flex; |
|
|
|
surrogateField.bindingPath = property.propertyPath; |
|
|
|
surrogateField.RegisterValueChangedCallback(evt => |
|
|
|
{ |
|
|
|