/// <summary> /// 清空场景当中的UI的GameObject /// </summary> public void clear() { var enumator = m_uiDic.GetEnumerator(); while (enumator.MoveNext()) { Daemon.Destroy(enumator.Current.Value.gameObject); } m_uiDic.Clear(); m_uiStack.Clear(); }
/// <summary> /// 清空场景当中的UI的GameObject /// </summary> public void clear() { for (int i = 0; i < m_uiStack.Count; i++) { if (m_uiDic.ContainsKey(m_uiStack[i])) { if (m_uiDic[m_uiStack[i]] != null) { Daemon.Destroy(m_uiDic[m_uiStack[i]].gameObject); } m_uiDic.Remove(m_uiStack[i]); } } m_uiStack.Clear(); }