/// <summary> /// 加载window /// </summary> /// <param name="windowName"></param> void LoadWindow(string windowName) { string path = PathManager.GetWindowPath(windowName); var obj = ResourceManager.Load <GameObject>(path); var windowObj = PoolManager.InstantiateGameObject(obj, PoolType.Window); windowObj.transform.SetParent(MainCanvas.transform, false); UIWindowBase window = windowObj.GetComponent <UIWindowBase>(); _windowDict.Add(windowObj.name, window); var uiDict = window.LoadAllUI(); RegistUI(window, uiDict); window.Init(); }