V和VM的绑定和更新部分在Binding.cs文件中实现
//vm=>v
private EventHandler sourceValueChangedHandler;
//v=>vm
private EventHandler targetValueChangedHandler;
//v=>vm
private bool isUpdatingSource;
//vm=>v
private bool isUpdatingTarget;
//vm=>v
protected virtual void UpdateTargetFromSource()
//v=>vm
protected virtual void UpdateSourceFromTarget()
数据更新的入口
//VM=>V 数据更新入口
UnityEventProxyBase
//V=>VM 数据更新入口
UnityPropertyProxy
调试
- 建议在ObservableObject.cs中的RaisePropertyChanged函数,这个地方无论是VM=>V还是V=>VM都会触发
- 同时在对UpdateTargetFromSource和UpdateSourceFromTarget两个函数下断点