public GameObject GetViewPrefab(EViewID viewID) { if (viewPrefabDic.ContainsKey(viewID)) { return(viewPrefabDic[viewID]); } string strUIPrefab = ""; ViewInfo viewInfo = null; if (!viewInfoDic.TryGetValue(viewID, out viewInfo)) { Debug.LogWarning(string.Format("The EDialogID [{0}] is not configed", viewID.ToString())); return(null); } string viewPrefabPath = string.Format("{0}/{1}", StrDef.VIEWDIR, viewInfo.prefabPath); GameObject viewPrefab = AssetLoadMgr.Instance.LoadNativePrefab <GameObject>(viewPrefabPath); if (viewPrefab == null) { Debug.LogError(string.Format("The view [{0}] is not exists", viewPrefab.name)); return(null); } viewPrefabDic.Add(viewID, viewPrefab); return(viewPrefab); }
/// <summary> /// 获取窗口实例化类型 /// </summary> public EViewInstType GetViewInstType(EViewID viewID) { ViewInfo viewInfo = null; if (!viewInfoDic.TryGetValue(viewID, out viewInfo)) { Debug.LogWarning(string.Format("The EDialogID [{0}] is not configed", viewID.ToString())); return(EViewInstType.None); } return(viewInfo.instType); }