using System.Collections; using System.Collections.Generic; using UnityEngine; public class QuizManager : MonoBehaviour { public List<QuestionAndAnswers> QnA; public GameObject[] options; public int currentQuestion; public Text QuestionTxt; private void Start() { QnA.RemoveAt(currentQuestion); generateQuestion(); } void SetAnswers() { for(int i = 0; i< options.Length; i++) { options[i].GetComponet<AnswerScript>.isCorrect = false; options[i].transform.GetChild(0).GetComponet <Text>().text = QnA[currentQuestion].Answer[i]; if(QnA[currentQuestion].CorrectAnswer == i+1) { options[i].GetComponet<AnswerScript>.isCorrect = true; } } } void generateQuestion() { currentQuestion = Random.Range(0,QnA.Count); QuestionTxt.text= QnA[currentQuestion].Question; SetAnswers(); } }
Assets\QuizManager.cs(11,12): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)