Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

[4.6 UI] What method do I need to call from the gameObject to modify a Text UI?

$
0
0
I've declared this at the top of the script

  1. publicGameObject scoreText;
In the editor i've dragged the Text UI element into this gameobject slot i created (im sorry i am fairly new and don't know what these boxes would be referenced as)

So now that i have the Text UI element as a game object, i want to modify the text in the script.

I have a function to keep score

Code (CSharp):
  1.  
  2. public void LZActivated()
  3.      {
  4.          levelScore += 500;...
[4.6 UI] What method do I need to call from the gameObject to modify a Text UI?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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