I ran the code you posted (in a copy that works) and it was moving from question to question as expected, but the last (?) question did not display the answer, it just went straight to the ‘complete’ screen. The reason for that is because this code here
if(progressBar.value == progressBar.maxValue)
{
isComplete = true;
}
is in the wrong place. When I moved it to where it should be
void Update()
{
timerImage.fillAmount = timer.fillfraction;
if(timer.loadNextQuestion)
{
// It should be here
if(progressBar.value == progressBar.maxValue)
{
isComplete = true;
return; // <- this should also be added
}
hasAnsweredEarly = false;
GetNextQuestion();
timer.loadNextQuestion = false;
}
else if(!hasAnsweredEarly && !timer.isAnsweringQuestion)
{
//by passing in a -1 because the index is 0 to 3 -1 will always give a false answer
DisplayAnswer(-1);
SetButtonState(false);
}
}
It displayed the answer before completing the game.
I have a ? next to last because I don’t think it was the last question. I am checking it now
EDIT I turns out it’s the same issue mentioned in this question