public static void UiUnBindLongPressCancel(Component but, UnityAction longPress) { LongPressEventTrigger button = but as LongPressEventTrigger; if (null != longPress) { button.onLongPressCancel.RemoveListener(longPress); } button.onLongPressCancel.RemoveAllListeners(); button.onLongPressCancel.Invoke(); }
public static void UiBindLongPressCancel(Component but, UnityAction longPress) { LongPressEventTrigger button = but as LongPressEventTrigger; button.onLongPressCancel.AddListener(longPress); }