Im got an issue here is that i creat 2 object are text Mesh one for Score and another for HighestScore. i controll them with a GameManager script attached to _GM objects.
Here is the script
public TextMesh highestScore;
public TextMesh score;
void Awake ()
{
highestScore.text = “Highest Score:” + PlayerPrefs.GetInt(“HighestScore”);
score.text = “Score:” + points;
}
which are works prety well in the editor but when i build the game. the Text just showed Hello world which are default. I have remembered to attach both the text mesh to the script but it dont work after build and run. please help me and thanks for all the help.
BTW. ITS HAPPEN THE SAME WITH GUItext. =((
Remember you have a log file for your debug builds, you can look into the project’s folder and read what that file says when you have bugs that differ from what you see in the editor.
In your case you probably have some value set for the editor playerpref but nothing yet for the build so the script just crashes there except that you don’t see it thanks to unity handling the error discretly for you.