Hi,
I just learning a bit but I wanna create some poll machine to get specific list from multiple list sources.
[SerializeField]private List<string> list1, list2, list3;// show list on inspector
private void Start(){
GetList(//idk what argument to feed here to pick combination list);
}
private List<String> GetList(//idk what paramater here to pick specific list from above){
var tempList = new List<string>();
// here i add all list to tempList
tempList.Add(list1);
tempList.Add(list2);
tempList.Add(list3);
//idk how to remove list1 or list2 or list3 base on parameter above
return tempList;
}
Any idea how to solve this problem? maybe list is not the good way?
Your question is quite confusing. It’s really hard to understand what you’re trying to accomplish. What is a “poll machine”?
Hi, thank you for reply me. Im sorry, my english is terrible. I mean some list collector which store all item from all list in the class field but i need some control when i just need particular list.
from example above i create GetList() function that store all item from multiple list by create tempList and then use tempList.Add(list1), tempList.Add(list2), tempList.Add(list3) to collect all item.
But i need some control to choose which list to exclude on the tempList when i reuse the function for particular reason. Thats why i dont know what parameter to put on GetList() function. Any idea?