This change makes source bindings and target bindings nearly identical. This means two things:
Source bindings can trigger an update to the target based on a UnityEventBase.
Target bindings can trigger an update to the source based on a PropertyChanged.
Previously, the source of bindings was processed by PropertyBinding.FigureBindings (for INotifyPropertyChanged) and the target of bindings was processed by PropertyBindingEditor.FigureViewBindings (for UnityEventBase). Now, both source and target bindings are processed in both ways (but only one will take affect, depending on how the binding has been configured).
Here is how this shows up in the editor for a pure view-to-view binding:
In the case where a source or target of the binding is both a MonoBehaviour with one or more UnityEventBaseand implements INotifyPropertyChanged, then both options show up:
In the case where the source or target of the binding is a MonoBehaviour that implements INotifyPropertyChanged and has exposes no UnityEventBase members, then PropertyChanged is the only option and so no option is shown (PropertyChanged is automatically selected since it is the only choice). This is to make the common case super simple.
In both cases (source and target), the dropdown only shows up if the binding mode indicates that the source or target can trigger an update.
This change makes source bindings and target bindings nearly identical. This means two things:
UnityEventBase
.PropertyChanged
.Previously, the source of bindings was processed by
PropertyBinding.FigureBindings
(forINotifyPropertyChanged
) and the target of bindings was processed byPropertyBindingEditor.FigureViewBindings
(forUnityEventBase
). Now, both source and target bindings are processed in both ways (but only one will take affect, depending on how the binding has been configured).Here is how this shows up in the editor for a pure view-to-view binding:
In the case where a source or target of the binding is both a
MonoBehaviour
with one or moreUnityEventBase
and implementsINotifyPropertyChanged
, then both options show up:In the case where the source or target of the binding is a
MonoBehaviour
that implementsINotifyPropertyChanged
and has exposes noUnityEventBase
members, thenPropertyChanged
is the only option and so no option is shown (PropertyChanged
is automatically selected since it is the only choice). This is to make the common case super simple.In both cases (source and target), the dropdown only shows up if the binding mode indicates that the source or target can trigger an update.
@ritijain