public static IView Load(Transform tran, ViewScheme scheme, string path) { IView v = Load(tran, scheme); Debug.Log(scheme + path); v.Setup(path); return(v); }
public GridContentData(ViewScheme vs, string path, int col, int row, int w, int h) { Scheme = vs; View = null; Path = path; Column = col; Row = row; Width = w; Height = h; }
public GridContentData(ViewScheme vs, LayoutData content, int col, int row, int w, int h) { Scheme = vs; View = null; Path = string.Empty; Content = content; Column = col; Row = row; Width = w; Height = h; }
//public static void Load(Transform tran,ViewData viewData) //{ // viewData.View = Load(tran, viewData.Scheme); // viewData.View.Setup(viewData.Path); //} public static IView Load(Transform tran, ViewScheme scheme) { GameObject go = Instantiate(Resources.Load <GameObject>(scheme.ToString()), tran); return(go.GetComponent <IView>()); }