Changing text through script not working?
Hey there,
I am changing my "Car Condition" text on my UI in the Update function. it looks like this:
playerUI.carConditionText.text = detectedCondition.ToString();
playerUI.fuelText.text = detectedFuel.ToString ();
Debug.Log ("Detected Car Condition: " + detectedCondition);
Debug.Log ("playerUI.carConditionText.text: " + playerUI.carConditionText.text);
I added some debug logs to see if the actual variables were changing AND if the text object was updating it's text.
It does!
However, even if my debug.log says my text.text has changed, it's not changing on screen!
Any idea?
Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612105831im_/https://answers.unity.com/themes/thub/images/avi.jpg)