public void OnClick() { if (subMenu == null)//don't bother clicking menu's with sub items { if (onClickMethod != null) { onClickMethod.Invoke(); } } }