How can I pick the answer from the array “string ansCheck = { “ANSWER1” , “ANSWER2” , “ANSWER3”};” and check it if the users input is in the list of array I’ve set? Here’s a sample code and I can’t seem to make what I want.
public void GetAnswer(){
Answer = GameObject.Find ("Canvas/a1/Panel/InputField/Text").GetComponent<Text> ().text;
FinalAnswer = Answer.ToUpper ();
string[] ansCheck = { "ANSWER1" , "ANSWER2" , "ANSWER3" };
if (FinalAnswer != ArrayList(ansCheck)) {
Wrong.GetComponent<Canvas>().enabled = true;
} else {
Correct.GetComponent<Canvas>().enabled = true;
GameObject.Find (PlayerPrefs.GetString ("currentBtn")).GetComponent<Button>().enabled = false;
GameObject.Find ("Btn2").GetComponent<Button>().enabled = true;
}
}