Hi… i have a problem
i think i wrote the code as well but still getting error
i tried closing scoreText.text = score.ToString();
but found that it works.
scoreText.text = “Hello”;
still not working
Any advice for me?
Hi… i have a problem
i think i wrote the code as well but still getting error
i tried closing scoreText.text = score.ToString();
but found that it works.
scoreText.text = “Hello”;
still not working
Any advice for me?
Hi,
Unfortunately, the code was blurry and therefore unreadable for me. Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.
You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.
Regarding the error messages in your console in your video, NullReferenceException means that a reference (“link”) to an instance is missing. Double click on the error message to see to which line in your code it is referring. If you exposed a field in the Inspector, make sure that it’s not empty.
Hope this helps.
See also:
Hey Nina I posted it’s a video on Youtube.
But no problem, I solved it in another way, adding [SeriallizeField] to the TMP_Text and dragging the ScoreBoard on it.
I fixed this problem.
And also added some code to display the message “score” before the score.
Use string interpolation. to add text
Really lucky I remember Rick teaching me!!
Thank you, Nina.
Good job on fixing the problem!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.