Skip to content

Button Quiz Question

eisclimber edited this page Feb 15, 2024 · 2 revisions

Button Quiz Question

class in ExPresSXR.Interaction.ButtonQuiz

Description

Serializable class representing a question in the TutorialButtonQuiz.

Besides being able to store question, answer and feedback values it also features methods for retrieving them using a QuizConfig.

Members

Static Methods

  • string GetEmptyCsvExportValues(char sep = CsvUtility.DEFAULT_COLUMN_SEPARATOR): Returns an empty CSV string matching the column count of NUM_CSV_EXPORT_COLUMNS.
  • string GetQuestionCsvHeader(char sep = CsvUtility.DEFAULT_COLUMN_SEPARATOR): Returns the csv header of the question.
  • List<object> GetQuestionCsvHeaderList(): Returns the csv header of the question as a list of objects.

Public Properties

  • int itemIdx: The index of the question. It should be the same as it's index in the QuizConfig.question it is contained in. Will be automatically set when editing via the SetupDialog.
  • VideoClip questionVideo: The video clip shown as question. Has higher priority than the videoUrl.
  • string questionVideoUrl: The video url (link to the 'StreamingAsset/'-folder) shown as question. Will be overwritten by questionVideo.
  • GameObject questionObject: The GameObject shown as question.
  • string questionText: The text shown as question.
  • GameObject[] answerObjects: An array of size 4 holding the GameObjects shown as answer option on a QuizButton.
  • string[] answerTexts: An array of size 4 holding the strings shown as answer option on a QuizButton.
  • bool[] correctAnswers: An array of 4 booleans where true marks ans answer and their associated text and GameObject as correct.
  • VideoClip feedbackVideo: The video shown as feedback.
  • string feedbackVideoUrl: The video url (link to the 'StreamingAsset/'-folder) shown as feedback. Will be overwritten by feedbackVideo.
  • GameObject feedbackObject: The GameObject shown as feedback.
  • string feedbackText: The text shown as feedback.

Public Methods

  • string GetFeedbackText(ButtonQuizConfig config): Generates a feedback text as specified by the config.
  • GameObject[] GetFeedbackGameObjects(ButtonQuizConfig config): Generates an array feedback GameObject as specified by the config.
  • VideoClip GetFeedbackVideo(ButtonQuizConfig config): Returns a feedback video clip as specified by the config (if exists).
  • VideoClip GetFeedbackVideoUrl(ButtonQuizConfig config): Returns a feedback video url as specified by the config (if exists).
  • string GetQuestionCsvExportValues(char sep = CsvUtility.DEFAULT_COLUMN_SEPARATOR): Returns the csv header of the question as csv-string.
  • List<object> GetQuestionCsvExportValuesList(): (MultiColumnValue & HeaderReplacement) Returns the question data of this config as list of objects.
    The header is: "questionIdx,questionVideo,questionObject,questionText,answerObject0,answerObject1,answerObject2,answerObject3,answerText0,answerText1,answerText2,answerText3,correctAnswers0,correctAnswers1,correctAnswers2,correctAnswers3,feedbackVideo,feedbackObject,feedbackText"

Constants

  • int NUM_CSV_EXPORT_COLUMNS = 19: Number of csv-columns of values returned the export functions.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally