There's a class named TextAssets which is used for text file readreading. http://docs.unity3d.com/Manual/class-TextAsset.html hereHere you can find the supported file format.
soSo if uyou want to read read the text file, the script would be like this:
class YourClassName : MonoBehaviour{
public TextAsset textFile; // drop your file here in inspector
void Start(){
string text = textFile.text; //this is the content as string
byte[] byteText = textFile.bytes; //this is the content as byte array
}
}
or you can read the text as resource like this:
TextAsset text = Resources.Load("YourFilePath") as TextAsset;