void Awake() { CreateObjectFromJson.SetPlayerPrefs(); PopulateQuestionsFromServerResult(); DontDestroyOnLoad(gameObject); }
/// <summary> /// Populates the Questions list with the questions of the ServerResult object. /// </summary> public void PopulateQuestionsFromServerResult() { Questions = new List <Question>(); JsonQuestions = CreateObjectFromJson.CreateServerResultFromJson(); foreach (Question p in JsonQuestions.m_ServerResult.result.questions) { p.m_RightAlternative = p.m_AnswerA; Questions.Add(p); } QuestionsAmount = Questions.Count; }