I’m trying to take a string list and when I hit the Load List button it populates each list item onto a toggle item.
It’s in a panel–>mask–>Toggles
I’ve created a list of type Toggle and added it to top level game object then set the length and added the toggles into the list.
In the code, I want to see
if (edit_Room.isOn) // toggle in different toggle group
{
foreach (string Data in roomNameList){
maskToggle.label = roomNameList.label; //put the data in string list into each toggle
}
Put the string data into the next toggle’s Label spot.
So string list loads
Mountain
Seas
Desert
and then three toggles will have
Mountain
Seas
Desert
populate. The rest of the toggles remain blank. The toggles will load lists then the user has the option of deleting one from the list. However, I can’t even get it to populate first.
How do I do this?