private static UnityEventImpl <T> GetEventOfType <T>() { if (!events.ContainsKey(typeof(T))) { events[typeof(T)] = new UnityEventImpl <T>(); } return((UnityEventImpl <T>)events[typeof(T)]); }
UnityEventImpl <T> FindEventImpl <T>() where T : struct { var keyType = typeof(T); object found; _dict.TryGetValue(keyType, out found); UnityEventImpl <T> eventImpl; if (found == null) { eventImpl = new UnityEventImpl <T>(); _dict.Add(keyType, eventImpl); } else { eventImpl = found as UnityEventImpl <T>; } return(eventImpl); }