Using ToString()

Hello, I’m on lesson 42 of the course “Learn Unity in C# & Code Your First Seven 2D Video Games”.
I’ve rewrite the code several time, i’ve also try to copy and paste the code froma GitHub but I still receive this advice:
NullReferenceException: Object reference not set to an instance of an object
NumberWizard.StartGame () (at Assets/scripts/number wizard/NumberWizard.cs:24)
NumberWizard.Start () (at Assets/scripts/number wizard/NumberWizard.cs:18)"
I’ve check if i’ve asigned the textmeshpro text and it’s on his place.
The game start, the guess text is assigned but then appear the error message and I can’t do anything.
Sorry for my English I hope it’s understendable.

I’ve found the issue by myself.
It was just a mistake made by me: I’ve assigned the code also to the camera object.
Stupid me :sweat_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms