Whenever I try and use Text.text to change the text for the UI it doesn’t work. The text doesn’t change. The weird thing is it does change in my Start function… Here is the code for the function that doesn’t change:
public void BuyItems ()
{
print ("Changing text?");
GoldText.text = "2";
}
EDIT:
Full script: using UnityEngine;using UnityStandardAssets.CrossPlatformInput;using UnityEn - Pastebin.com
I also realized that after I stop the game and start it again the text is 2 which is what I was trying to change it to in the first place. Then if I start it again it goes back to what the Start method is changing it too. It seems that the text only gets updated after I stop the game and start it again…