void Update ()
{
PassStringToLabel("GenderLabel", info.gender[currentSelection]);
}
public void PassStringToLabel(string labelName, string info)
{
GameObject obj = GameObject.Find(labelName);
UILabel lbl = obj.GetComponent<UILabel>();
lbl.text = "";
lbl.text = info;
}
info.gender is a string list in another class. The name of the label I'm changing is "GenderLabel".