Exemplo n.º 1
0
 private static void ClearAllUi()
 {
     //清空层里面的所有物体
     if (_uiBind != null && _uiBind.CanvasList != null)
     {
         var e = _uiBind.CanvasList.GetEnumerator();
         using (e)
         {
             while (e.MoveNext())
             {
                 var key = e.Current.Key;
                 if (key == UiLayer.DontDestroy)
                 {
                     continue;
                 }
                 if (e.Current.Value != null)
                 {
                     GameObjectTools.DestroyAllChild(e.Current.Value.gameObject);
                 }
             }
         }
     }
 }