- Home /
Changing the names of a list of Buttons all at once?
Basically I want to have a list of button objects, then run through the whole list and change their names dynamically.
Comment
Best Answer
Answer by ShadyProductions · Oct 18, 2019 at 04:55 PM
public Text[] buttonTexts; //assign in inspector
public void ChangeButtonNames(string toName) {
foreach (var button in buttonTexts) {
button.text = toName;
}
}
This is pretty basic.