Wrong answer for wrong question

I’ve been creating the quiz on the 2D Unity course by Gary.

I’ve got to the end of the Lists Section and thought maybe I had messed some code up, so I have spent a good 30 mins trying to figure out what’s wrong but couldn’t figure it out.

I then copied Gary’s code and I am still having the same problem.

When I run the game, the first question appears and when I click on the answer, it then shows me a completely different answer from a different question. It’s happening on each random question.

Any help would be appreciated.

Thanks

Hi,

Where did you define the questions and answers?

And did you double check if the buttons have the correct integers defined in their respective OnClick field in the Inspector?

If you cannot find the issue, I would suggest to rewatched the video at least one more time and compare your project to Gary’s. Since we are connecting different things from different places, it is easy to make a mistake.


See also:

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

Privacy & Terms