[Solved] Where to put text next to guess?

Hello,

I want to add a question similar to “Is this your number?” next to the guessing number to my Number Wizard project. Where did the programmer put “Is this your number” from the “53. Finishing Number Wizard UI” video? In the script or scene?

Your answer to my question would be much appreciated!

Thank you

1 Like

HI there!

The text “Is this your number” was created in the scene, using a new text gameobject.

The other possibility would have been to do it on the script as you suggested. Instead of doing updating the text as in the video:

text.text = guess.ToString();

You could write:

text.text = “Is this your number “ + guess.ToString();

The problem is that this way you cannot set it to another color like in the video. There probably is a way to do so in the script, but I guess it would be much trouble for nothing.

Long story short, add the text in the scene using a new game object. :slight_smile:

1 Like

Hello Ian,

Thank you very much for your help! I prefer your second way. That is, I added the question to the script.

Thank you again.

1 Like

Privacy & Terms