Hi there,
I’m quite new to scripting and Unity, and I encountered something that I don’t quite get, but would really like to understand:
I have the “???” text ready to change depending on my script.
In my script, I’ve imported UnityEngine.UI and initialized a Text variable which I would change later on in the script.
Problem:
(I don’t know what technical terms to use here, so excuse me for my explanation)
When I add my script as a component to the text itself, and reference the text like so:
[guess being the “???” text]
I get this error:
![]()
and the text doesn’t change since the first time it was set. The line is " currentGuess.text = guess.ToString();"
However when I do the same with an empty gameobject instead, it works like a charm.
If anyone who reads this understands what I’m trying to ask, could you explain why one works and the other one doesn’t?

