public void AddToggleListener(string panelName, string widgetName, UnityAction <bool> action) { UIBehaviour uiBehaviour = GetUIBehaviour(panelName, widgetName);; if (uiBehaviour != null) { uiBehaviour.AddToggleListener(action); } }