Quantcast
Channel: Questions in topic: "vehicles"
Viewing all articles
Browse latest Browse all 123

How do I constantly update a variable that is displayed in a UI text component?

$
0
0
I have a vehicle level that I set up using the Standard Assets vehicle sample level. The CarController script contains a float named Revs that I want to constantly update in the UI while driving around. I have this set up in the CarController script by converting it to a string and assigning it to a text variable which is linked in to the UI. This displays the variable but it only briefly flickers on-screen every so often, how can I make Unity constantly update the variable in the UI so I can always see what the current value is? ![alt text][1] link text [1]: /storage/temp/72105-revtext-01.jpg

Viewing all articles
Browse latest Browse all 123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>