public void StopListening(string eventName, UnityAction <object> listener) { GeneralEvent thisEvent = null; if (eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }
public static void StopListening(int eventName, UnityAction <GeneralData> listener) { if (eventManager == null) { return; } GeneralEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.RemoveListener(listener); } }