The reference to change is ".text". For example:
MessageCentreText.text = "this is my text";
Of course, that's only half of it. To make a button do that, you'd need to put it in a script. Something like:
public void ChangeText(){
MessageCentreText.text = "this is my text";
}
Then, you would need your button to call that script. In the button setings, there is an "OnClick" section. You need to drag whatever has this script on it in there and assign the button to call ChangeText.
↧