using System.Collections.Generic; using UnityEngine; namespace NBF { public class TabListData { public string TabName; public bool Selected; public List ListData; public void AddTestData(int index) { ListData = new List(); TabName = $"标题-{index + 1}"; var count1 = Random.Range(5, 10); var count2 = Random.Range(10, 30); for (int i = 0; i < count1; i++) { ListData.Add(new ListClassifyData($"Title-{i}")); for (int j = 0; j < count2; j++) { var item = new ShopGearData(); item.title = $"Item {i}-" + j; ListData.Add(item); } } } } }