public void DelComponent(ChannelConfig config) { UI_ConfigComponent component = null; if (componentDic.TryGetValue(config.channelId, out component)) { componentDic.Remove(config.channelId); component.Close(); return; } }
public void AddOrRefreshComponent(ChannelConfig config) { UI_ConfigComponent component = null; if (componentDic.TryGetValue(config.channelId, out component)) { component.Init(config); return; } var item = UIManager.instance.CreateComponent <UI_ConfigComponent>(UINames.ConfigComponet, scrollView); item.Init(config); item.callback = OnBtnClickDetail; componentDic[config.channelId] = item; }