using UnityEngine;
using UnityEditor;
using System.IO;
public class HandleTextFile : MonoBehaviour
{
// This is how I read a textfile, contained within the Resources
// folder:
TextAsset textFile;
string text;
string[] lines;
void Start()
{
textFile = Resources.Load("Resources\test") as TextAsset; // Loads file
text = textFile.ToString(); // Converts to string
lines = text.Split('\n'); // Splits per newline
// Do something with it
}
}