Example #1
0
 public ViewModelBinding GetRoot()
 {
     if (parentBinding == null)
     {
         return(this);
     }
     return(parentBinding.GetRoot());
 }
Example #2
0
 void Start()
 {
     viewModelBinding = GetComponentInParent <ViewModelBinding>();
     if (viewModelBinding == null)
     {
         Debug.LogWarning("Hide view event binding failed! the viewModelBinding is null" + name);
         return;
     }
     viewModelBinding = viewModelBinding.GetRoot();
     button           = GetComponent <Button>();
     button.onClick.AddListener(OnEventChanged);
 }