void Init() { string strPrefab = "App/Prefab/Place/" + GetPrefabName(); string strPrefabDefault = "Common/Prefab/Place/UIPlaceController"; GameObject obj = PrefabCache.main.Load(strPrefab); if (obj == null) { obj = PrefabCache.main.Load(strPrefabDefault); } uiPrefab = obj.GetComponent <UIPlaceBase>(); }
public void PreLoadDataForWeb() { UIPlaceBase uiplace = ui; if (uiplace == null) { uiplace = uiPrefab; } if (uiplace != null) { uiplace.PreLoadDataForWeb(); } }
public void CreateUI() { ui = (UIPlaceBase)GameObject.Instantiate(uiPrefab); ui.SetController(this); ViewControllerManager.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject); }