[Suggestion] I used System.IO.File.ReadAllText

Rather than putting the story in the code, I opted to read from a text file which I dragged into the assets window.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.IO;

public class TextController : MonoBehaviour {

	public Text text;
	string openingText = System.IO.File.ReadAllText("Assets\\MainText.txt");
	
	void Start () {
		text.text = openingText;
	}
}
4 Likes

Thanks for sharing.

Privacy & Terms