public override void CallWhenLoadResources() { m_instance = this; ID = MFUIManager.MFUIID.NewChallengeUI; MFUIManager.GetSingleton().RegisterUI(ID, m_myGameObject); MFUIUtils.AttachWidget(m_myTransform, GameObject.Find("MogoMainUIPanel").transform); m_myGameObject.name = "NewChallengeUI"; //MFUIGameObjectPool.GetSingleton().NotRegisterGameObjectList(ID); System.Collections.Generic.List <MFUIResourceReqInfo> listInfo = new System.Collections.Generic.List <MFUIResourceReqInfo>(); for (int i = 0; i < 8; ++i) { int index = i; MFUIResourceReqInfo info = new MFUIResourceReqInfo(); info.id = ID; info.path = "NewChallengeUIGrid.prefab"; info.goName = string.Concat("NewChallengeUIGrid", index); listInfo.Add(info); } MFUIGameObjectPool.GetSingleton().RegisterGameObjectList(listInfo, null, true); }
public override void CallWhenLoadResources() { m_instance = this; ID = MFUIManager.MFUIID.NewChallengeUI; MFUIManager.GetSingleton().RegisterUI(ID, m_myGameObject); MFUIUtils.AttachWidget(m_myTransform, GameObject.Find("MogoMainUIPanel").transform); m_myGameObject.name = "NewChallengeUI"; //MFUIGameObjectPool.GetSingleton().NotRegisterGameObjectList(ID); System.Collections.Generic.List<MFUIResourceReqInfo> listInfo = new System.Collections.Generic.List<MFUIResourceReqInfo>(); for(int i = 0;i < 8;++i) { int index = i; MFUIResourceReqInfo info = new MFUIResourceReqInfo(); info.id = ID; info.path = "NewChallengeUIGrid.prefab"; info.goName = string.Concat("NewChallengeUIGrid", index); listInfo.Add(info); } MFUIGameObjectPool.GetSingleton().RegisterGameObjectList(listInfo, null, true); }