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

Trouble with Text field in the new ui

$
0
0
So I have a panel and to that panel iv'e attached a script that does basically this:

Code (CSharp):
  1. public Text myTextField;
Than in the inspector I dragged the Text element
Than in the update function I just do this:

Code (CSharp):
  1. myTextField.text = "tralalalala";
for some reason the console is giving me a NullReferenceException: Object reference not set to an instance of an object error

The thing is the text element is set in the inspector and its actually working as in the...

Trouble with Text field in the new 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>