public static void StartListening(NetworkEventType eventType, UnityAction <InputDataHolder> listener) { AsyncEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventType, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new AsyncEvent(); thisEvent.AddListener(listener); instance.eventDictionary.Add(eventType, thisEvent); } }