private int GenerateRandomNumberInQuestions() { if (answers.Count == 0) { panelOne.gameObject.SetActive(false); buttonFalse.gameObject.SetActive(false); buttonTrue.gameObject.SetActive(false); endGame.Init("You Win", countOfCorrectAnswers, max); } System.Random rand = new System.Random(); return(rand.Next(answers.Count)); }