public static void Search() { if (searchTextMemory.Value == Tools.SearchTextMemory.Global) { foreach (var field in Tools.fields.Where(field => field != null)) { field.text = searchString; } } if (!Tools.UpdateUI(category)) { return; } if (searchString == "") { return; } var trav = Traverse.Create(controller); var datas = trav.Field("scrollerDatas").GetValue <CustomSelectScrollController.ScrollData[]>(); var datalist = datas.ToList(); foreach (var data in datalist.ToArray()) { if (Tools.ItemMatchesSearch(data.info, searchString)) { continue; } if (controller.selectInfo == data) { controller.SelectInfoClear(); } datalist.Remove(data); } datas = datalist.ToArray(); trav.Field("scrollerDatas").SetValue(datas); view.ReSetListItemCount(Mathf.CeilToInt((float)datas.Length / trav.Field("countPerRow").GetValue <int>())); }