public void UnRegisterActivityResultHandler(int requestCode, OnActivityResultDelegate handler) { if (m_ActivityResultHandlers != null && m_ActivityResultHandlers.ContainsKey(requestCode)) { List <OnActivityResultDelegate> handlers = m_ActivityResultHandlers[requestCode]; if (handlers.Contains(handler)) { handlers.Remove(handler); } } }
public void RegisterActivityResultHandler(int requestCode, OnActivityResultDelegate handler) { if (m_ActivityResultHandlers == null) { m_ActivityResultHandlers = new Dictionary <int, List <OnActivityResultDelegate> >(); } if (!m_ActivityResultHandlers.ContainsKey(requestCode)) { m_ActivityResultHandlers[requestCode] = new List <OnActivityResultDelegate>(); } if (!m_ActivityResultHandlers[requestCode].Contains(handler)) { m_ActivityResultHandlers[requestCode].Add(handler); } }