Same Answer?

In this video instead of doing what was shown as the correct answer in the challenge when I had to show what the correct answer was when I got an incorrect answer, I instead did:

else
{
questionText.text = “Incorrect! The correct answer was 4!”;
Image buttonImage = answerButtons[3].GetComponent();
buttonImage.sprite = correctAnswerSprite;
}

I wanted to know if there was a major difference between what I did and if I have to change this

Hi,

Good job on challenging yourself. :slight_smile:

In many cases, there are multiple ways to make something work in Unity, and Gary cannot show all of them. If your code works, it’s a solution by definition. Since we are no clairvoyants, you have to test your code to figure out if there is a “major difference” (whatever that means). If you notice problems, you simply solve them like you solved this problems. In the end, programming is mainly about solving problems, less about the code itself.


See also:

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

Privacy & Terms