using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UI_SelectDevicePanel : BasePanel { private List allSchemeName; private Dictionary allDeviceTypes; public void Init() { allSchemeName = GameManager.DataMgr.GetAllSchemeName(); allDeviceTypes = GameManager.DataMgr.GetAllDeviceTypes(); CreatItem(); } void CreatItem() { var onlyDeviceHashSet = new HashSet(); foreach (var scheme in allSchemeName) { if (!onlyDeviceHashSet.Contains(scheme.deviceTypeId)) { onlyDeviceHashSet.Add(scheme.deviceTypeId); var titleItem= GameManager.ResourcesMgr.Load(Const.UI_Item + "UI_SelectDevicePanel/titleItem"); titleItem.transform.parent = GetControl("DeviceScrollView").content; } } } }