Search Unity

My TextMesh work in editor but dissapear after build & run.

Discussion in 'Editor & General Support' started by HoangPh, Jun 3, 2014.

  1. HoangPh

    HoangPh

    Joined:
    Apr 25, 2014
    Posts:
    18
    [SOLVED]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.
     
    Last edited: Jun 3, 2014
  2. HoangPh

    HoangPh

    Joined:
    Apr 25, 2014
    Posts:
    18
    OMG i put the _GM tags is editor only =)) teehee sorry for being so silly