private IEnumerator _OnViewLoad(ViewBase view, string prefabName, Transform parent) { view.name = prefabName; _viewDict[prefabName] = view; try { view.OnLoad(); } catch (Exception ex) { UnityEngine.Debug.LogError(ex); throw; } EventUtils.Dispatch(UIEvent.UI_BEFORE_SHOW, prefabName, (int)view.uiLayer); yield return(null); while (view != null && !view.IsLoadFinish()) { yield return(null); } if (view == null) { yield break; } if (parent == null) { parent = trans_UI; } try { view.BeforeShow(); } catch (System.Exception) { throw; } /// <summary> /// 预留处理接口 /// </summary> /// <value></value> if (view.transform.parent != parent) { } }