Pretty simply, It doesn’t recognize the word ‘text’ at the bottom of the script and I can’t resolve the issue no matter what. Plz Help!
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class TestBoxManager : MonoBehaviour {
public GameObject textBox;
public Text theText;
public TextAsset textFile;
public string[] textLines;
public int currentLine;
public int endAtLine;
public CharacterController player;
void Start () {
player = FindObjectOfType<CharacterController> ();
if (textFile != null) {
textLines = (textFile.text.Split ('
'));
}
if (endAtLine == 0) {
endAtLine = textLines.Length - 1;
}
}
void Update() {
theText.text = textLines [currentLine]; // <--- ERROR ON THIS LINE
}
}