Hello
I’ve just finished the part with the Lists and as soon as I remove the “GetNextQuestion(),” from the Start method, the game breaks.
I have a null exception that gives :
NullReferenceException: Object reference not set to an instance of an object
Quizz.DisplayAnswer (System.Int32 index) (at Assets/Scripts/Quizz.cs:63)
Quizz.Update () (at Assets/Scripts/Quizz.cs:47)
line 63 being if (index == currentQuestion.GetCorrectAnswerIndex())
and 47 DisplayAnswer(-1);
The thing is, after trying some stuff here and there, I took the course file from GitLab here Assets/Scripts/Quiz.cs · 00eda531443453dbbbfb92173899b3d75b350f67 · GameDev.tv / Complete Unity 2D 2021 / Quiz Master · GitLab to compare, and as I couldn’t find any difference, i decided to comment out my own code and copy/paste the content of this one instead. The problem remains with the teacher’s code. Is there something broken with the new version of Unity or something that I just totally missed ?
Thank you