NullReferenceException: Object reference not set to an instance of an object (Unity UI)
Hallo I wrote this script: public void RandomFunction () {
randomNumber = UnityEngine.Random.Range (0, listCount);
Debug.Log(Objecte[randomNumber]);
ergebnis.text = (Objecte[randomNumber]);
}
but the text is not displayed in my game in the Text field.The Debug.Log is working and i used this ui text on an other place in my Script and there it was working. ergebnis.text = "Object "+listCount.ToString () +" was succesfully added"; Please help.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612073042im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I make an external text document show only between certain lines in UI Text 1 Answer
Method Skipping Inputs 2 Answers
[HELP] To show wave number on a zombie survival game. 0 Answers
Error upon rebooting Unity - "Associated script cannot be loaded" How can I resolve this? 2 Answers
Start and Stop Timer Help 1 Answer