public static void StartListening(string eventName, UnityAction <string> listener) { //UnityEvent thisEvent = null; CustomStringEvent thisEvent = null; if (instance.eventDictionary.TryGetValue(eventName, out thisEvent)) { thisEvent.AddListener(listener); } else { thisEvent = new CustomStringEvent(); thisEvent.AddListener(listener); instance.eventDictionary.Add(eventName, thisEvent); } }