public void Remove(BaseNotification notification) { List <BaseNotification> notificationList; _notificationDict.TryGetValue(notification.Id, out notificationList); #if UNITYR_EDITOR if (notificationList == null || notificationList.IndexOf(notification) == -1) { LogUtil.E("Could not find notification {0} in NotificationManager!", notification.ToString()); return; } #endif notificationList.Remove(notification); }
public void Add(BaseNotification notification) { List <BaseNotification> notificationList; if (!_notificationDict.TryGetValue(notification.Id, out notificationList)) { notificationList = new List <BaseNotification>(); _notificationDict.Add(notification.Id, notificationList); } #if UNITYR_EDITOR if (notificationList.IndexOf(notification) != -1) { LogUtil.E("Notification {0} has been added to the NotificationManager!", notification.ToString()); return; } #endif notificationList.Add(notification); }