Hi guys, in case the title isn’t clear, What I’m trying to do is this:
When I click on a button, the ChangeLabelToButtonsText() Method is called. Within the method, I want the labelObject’s text to change to whatever the text on the button is.
Below is what I have but it’s not working.
public GameObject labelObject; //labelObject is the GUI Text GameObject
void ChangeLabelToButtonsText()
{
labelObject.GetComponent<Text>().text = this.GetComponent<Text>().text;
}
Thanks guys,
Stephen