public void CreateUI() { uiGuanka = (UIGuankaBase)GameObject.Instantiate(uiGuankaPrefab); uiGuanka.indexPlace = indexPlace; uiGuanka.SetController(this); ViewControllerManager.ClonePrefabRectTransform(uiGuankaPrefab.gameObject, uiGuanka.gameObject); }
void Init() { string strPrefab = "App/Prefab/Guanka/" + GetPrefabName(); string strPrefabDefault = "Common/Prefab/Guanka/UIGuankaController"; GameObject obj = PrefabCache.main.Load(strPrefab); if (obj == null) { obj = PrefabCache.main.Load(strPrefabDefault); } uiGuankaPrefab = obj.GetComponent <UIGuankaBase>(); }
public void PreLoadDataForWeb() { UIGuankaBase ui = uiGuanka; if (ui == null) { ui = uiGuankaPrefab; } if (ui != null) { ui.PreLoadDataForWeb(); } }