Class McqDataSet
ScriptableObject asset for storing MCQ data sets that can be created and edited in the Unity Editor
public class McqDataSet : ScriptableObject
- Inheritance
-
McqDataSet
Properties
Description
Description of this MCQ set
public string Description { get; }
Property Value
QuestionCount
Total number of questions in this set
public int QuestionCount { get; }
Property Value
Questions
All MCQ questions in this set
public List<McqData> Questions { get; }
Property Value
RandomizeOrder
Whether questions should be randomized when retrieved
public bool RandomizeOrder { get; }
Property Value
SetTitle
Title of this MCQ set
public string SetTitle { get; }
Property Value
Methods
AddQuestion(McqData)
Add a new question to this set
public void AddQuestion(McqData mcqData)
Parameters
mcqDataMcqData
ClearQuestions()
Clear all questions from this set
public void ClearQuestions()
GenerateDummyMcqSet()
Generate dummy MCQ data for testing purposes
public void GenerateDummyMcqSet()
GenerateSmallTestSet()
Generate a small sample set for quick testing
public void GenerateSmallTestSet()
GetQuestions(bool)
Get all questions, optionally randomized
public List<McqData> GetQuestions(bool randomize = true)
Parameters
randomizebool
Returns
GetQuestions(int, bool)
Get a specific number of questions from this set
public List<McqData> GetQuestions(int count, bool randomize = true)
Parameters
Returns
GetRandomQuestion()
Get a random question from this set
public McqData GetRandomQuestion()
Returns
RemoveQuestion(int)
Remove a question at specified index
public void RemoveQuestion(int index)
Parameters
indexint
ValidateSet(out string)
Validate all questions in this set
public bool ValidateSet(out string errorMessage)
Parameters
errorMessagestring