public void CreateUI() { ui = (UIShare)GameObject.Instantiate(uiPrefab); ui.SetController(this); ViewControllerManager.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject); ui.callBackClick = OnUIShareDidClick; }
void Init() { string strPrefab = "Common/Prefab/Share/UIShare"; GameObject obj = PrefabCache.main.Load(strPrefab); uiPrefab = obj.GetComponent <UIShare>(); }