-
Notifications
You must be signed in to change notification settings - Fork 25
🛠️Integration & Event Subscription
Martin Feick edited this page Dec 11, 2020
·
2 revisions
The package generates all required components based on the specified .json file when running the scene. You can dis-/enable the questionnaires on demand by accessing the questionnairelist using the following code. That's all it takes =)
private GameObject _vrQuestionnaireToolkit;
private GenerateQuestionnaire _generateQuestionnaire;
void Start()
{
_vrQuestionnaireToolkit = GameObject.FindGameObjectWithTag("VRQuestionnaireToolkit");
_generateQuestionnaire = _vrQuestionnaireToolkit.GetComponentInChildren<GenerateQuestionnaire>();
}
void Demonstrate()
{
_generateQuestionnaire.Questionnaires[0].SetActive(false); // disable questionnaire 0
_generateQuestionnaire.Questionnaires[1].SetActive(true); // enable questionnaire 1
}
private ExportToCSV _exportToCsvScript;
private GameObject _exportToCsv;
void Start()
{
_exportToCsv = GameObject.FindGameObjectWithTag("ExportToCSV");
_exportToCsvScript = _exportToCsv.GetComponent<ExportToCSV>();
_exportToCsvScript.QuestionnaireFinishedEvent.AddListener(YourFunction); // e.g, call next questionnaire from list
}