Creating and Managing Quizzes
Last updated
Last updated
The Quiz object contains the actual questions for the quiz. Each quiz links to a category and contains a list of Question objects.
Right-click in the Project window.
Navigate to Create → Kuizo → Data→ Quiz.
A new Quiz object will be created.
Rename it and place it in the correct folder location:
Default location: KamelMahjoub/Kuizo/Ressources/Data/Quizzes.
If the default folder location has been modified, place it in the updated directory specified in KuizoFolderPaths.
Select a Quiz object in the Project window.
In the Inspector, enter the quiz name.
Next, select a category from the categories dropdown.
The available categories come from the Categories object linked in the Kuizo Global Settings.
Assign the question objects to the questions list
Press Ctrl+S to save the Quiz object.
Select a Quiz object in the Project window.
In the Inspector, find the questions list field.
Adjust the size value to the number of questions you want to include. This will generate empty slots.
For each slot, drag and drop a Question object from your Project window into the field.
Alternatively, you can click the small circle icon to the right of a slot to select a Question object from the object picker.
Press Ctrl+S to save the Quiz object.
Select a Quiz object in the Project window.
In the Project window, locate and select multiple Question Objects that you want to include in the quiz.
Drag the selected Question objects and drop them directly onto the questions list field in the Inspector.
The questions list field will automatically resize to fit all the dropped Question objects, assigning each one to a new slot.
Press Ctrl+S to save the Quiz object.
Select the Quiz object in the Project window.
In the Inspector, expand the questions list field.
Select the category to be removed.
Click the minus (-) button at the bottom of the list to remove the selected category.
Pressing the minus button without selecting a question will delete the last entry.
Alternatively, you can right-click on the selected question and choose Delete Array Element to remove it.
Press Ctrl+S to save the Quiz object.
By default, the location for the Quiz objects is :
KamelMahjoub/Kuizo/Resources/Data/Quizzes
This tutorial requires modifying scripts.
In the Project window, navigate to KamelMahjoub/Kuizo/Scripts/Constants.
Locate and open the script named KuizoFolderPaths.
Inside the script, find the variable QuizzesFolderPath.
Update it to your desired location.
The quiz object must be placed inside a Resources folder for proper loading at runtime.
Save the script.
Return to Unity and let it recompile the changes.