public static T FindUI <T>(this IDictBinding dictBind, string name) where T : Component { T t = default(T); AutoBinding abind = dictBind[name]; if (null != abind) { t = abind.GetComponent <T>(); } return(t); }
public static Button AddButton(this IDictBinding dictBind, string name, UnityAction action) { Button btn = null; AutoBinding abind = dictBind[name]; if (null != abind) { btn = abind.GetComponent <Button>(); if (null != btn) { btn.onClick.AddListener(action); abind.cacheObj = btn; } } return(btn); }