'timer.isAnsweringQuestion' is inaccessible due to its protection level

When Course 62 “Connecting the timer” comes to an end. I try to compile the script and then come ‘timer.isAnsweringQuestion’ is inaccessible due to its protection level in my unity project. What should i do? Because i’m new here. Thanks.

Hi Alika,

Is the isAnsweringQuestion variable public? Remember you can also look at the lecture code changes via the link in the Resources of each lecture.


See also:

Thanks. After i did just like you said from top to bottom of the update then come this :
NullReferenceException: Object reference not set to an instance of an object
Quiz.DisplayQuestion () (at Assets/Script/Quiz.cs:86)
Quiz.GetNextQuestion () (at Assets/Script/Quiz.cs:81)
Quiz.Start () (at Assets/Script/Quiz.cs:29)

and this :
NullReferenceException: Object reference not set to an instance of an object
Quiz.Update () (at Assets/Script/Quiz.cs:35)

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.

@AlikaBattleAngel, save changes in your other scripts :wink:

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

Privacy & Terms