protected override void DebugIsValid(StringBuilder sb) { sb.AppendLine($"# Invalid searches (inspect individual response.DebugInformation for more detail):"); foreach (var i in AllResponses.Select((item, i) => new { item, i }).Where(i => !i.item.IsValid)) { sb.AppendLine($" search[{i.i}]: {i.item}"); } }
// Start is called before the first frame update void Start() { _questionJson = Application.dataPath + "/Text/AllQuestions.json"; string allQuestionText = File.ReadAllText(_questionJson); questions = QuestionData.CreatFromJson(allQuestionText); questionPool = questions.questionPool.questions; _answerJson = Application.dataPath + "/Text/AllAnswers.json"; string allAnswerText = File.ReadAllText(_answerJson); characterData = AllResponses.CreateFromJson(allAnswerText); UpdateUI(); //WriteNewJson(fileLocation); //use to creat new Json file, if file does not already exist. }