I am creating a quiz at the moment with a main menu and 2 sections (one for learning information and the other to test user knowledge). Currently, if the user were to attempt the test and then wish to attempt it a second time, the quiz does not reset itself.
An example… if they begin the quiz and reach question 3, decide they need to revise some more so go to the ‘learn’ section. When they return to the quiz it is still at question 3.
I am sure the solution is fairly simple, but I just need to know how to get the quiz to reset itself every time the user returns to it?
Your going to want to use DontDestroyOnLoad to preserve the quiz object. Be careful however as you may get quiz control objects stacking up if you instantiate a new one every time you load your quiz scene. You may want to use a script to check if you already have one rather then simply instantiating one every time you load your quiz scene.
DontDestroyOnLoad documentation
Edit: I’m assuming your quiz and learning page are each individual scenes. You could also have your quiz object/learning center object in the same scene and simply turn the unused one off.