- Home /
Unity 4.6 Text Misbehaves During Gameplay
This is the input via c#:
void FixedUpdate ()
{
//GO menu
GOscore.text = Score.ToString ();
GOapples.text = ApplesEarned.ToString ();
GOhs.text = GameController.HighScore.ToString ();
if (GameINSESSION == true)
header.text = Score.ToString ();
}
It works well most of the time (image 1), but sometimes (randomly) it only shows parts of the text (image 2)
Any Help is appreciated :)
screenshot-2015-07-09-10-02-16.png
(65.6 kB)
screenshot-2015-07-09-10-34-49.png
(53.5 kB)
Comment
Answer by barbe63 · Jul 10, 2015 at 03:50 AM
You should not set your text in an Update function and certainly not in a fixedUpdate!
Just set your text when you need it (first load and when it changes).
Thank You! Your $$anonymous$$ethod seemed to have worked for me. However, I have not tested it much. Therefore, I find it most fitting if I check your answer off after giving it sufficient testing. Thanks again! :)