private BaseWindow LoadWindow(WindowInfo info) { Object res = null; if (resMap.TryGetValue(info.path, out res) == false) { res = Resources.Load(info.path); resMap.Add(info.name, res); } GameObject windowObj = GameObject.Instantiate(res, Vector3.zero, Quaternion.identity, contentTrans) as GameObject; BaseWindow window = (BaseWindow)GameUtils.GetOrAddComponent(windowObj, info.type); window.info = info; BaseWindowView view = (BaseWindowView)windowObj.GetComponent <BaseWindowView>(); window.SetView(windowObj.GetComponent <BaseWindowView>()); return(window); }
public void SetView(BaseView view) { this.view = view as BaseWindowView; }