public void OnOK() { //check if all questions are filled in: string s1Answer = slot1.GetAnswer(); string s2Answer = slot2.GetAnswer(); string s3Answer = slot3.GetAnswer(); if (s1Answer == null || s2Answer == null || s3Answer == null) { return; } //log answers if (slot1.gameObject.activeSelf) { Log.WriteSurveyAnswer(currentPage * 3, s1Answer); } if (slot2.gameObject.activeSelf) { Log.WriteSurveyAnswer(currentPage * 3 + 1, s2Answer); } if (slot3.gameObject.activeSelf) { Log.WriteSurveyAnswer(currentPage * 3 + 2, s3Answer); } currentPage++; if (currentPage == 1 && skip1) { currentPage++; } if (currentPage < Qpages) { ShowPage(currentPage); } else { if (MenuScript.state == "endQ") { MenuScript.state = "finished"; } menu.OnNext(); } }