I think I am just missing one simple thing. I have an inputfield, button and two text boxes. The first text box(“output”) is pulling its text from the inputfield. I want the second textbox(“englishWords”) to pull its text from the list that is being made. sender() is what the button calls.
Here is my code
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Collections.Generic;
public class butt : MonoBehaviour {
public GameObject input;
public GameObject output;
public GameObject englishWords;
public List<string> words = new List<string>();
public void sender()
{
output.GetComponent<Text> ().text = input.GetComponent<InputField> ().text;
input.GetComponent<InputField> ().text = "";
words.Add (input.GetComponent<InputField> ().text);
for (int i = 0; i < words.Count; i++)
{
englishWords.GetComponent<Text> ().text = (words*);*
-
}*
}