void Init() { GameObject obj = null; string strPrefabApp = "App/Prefab/ScreenShot/UIAdHomeController"; string strPrefab = "AppCommon/Prefab/ScreenShot/UIAdHomeController"; obj = PrefabCache.main.Load(strPrefabApp); if (obj == null) { obj = PrefabCache.main.Load(strPrefab); } uiPrefab = obj.GetComponent <UIShotBase>(); }
public void CreateUI() { ui = (UIShotBase)GameObject.Instantiate(uiPrefab); ui.SetController(this); ViewControllerManager.ClonePrefabRectTransform(uiPrefab.gameObject, ui.gameObject); }