I am now using this to read a text file
using (TextReader reader = File.OpenText(path))
It is OK when running in Unity Editor but file not found exception will occur if running in my Windows/Android phones.
To solve this on the Windows Phone platform I can build the solution first and use Visual Studio to open the sln file then add the text file into the project and use Visual Studio to build the project again but for Android I don’t know how to do this. It is also very tedious to manually add files each time when I want to debug on my phones.
I tried to use the import/open asset command in Unity Editor to copy the files into my project but file not found exception persists. I read about that I can use TextAsset in MonoBehaviour but if I do this I need to rewrite most of my codes and it seems unnecessary because I simply want to read some simple text files!
So in short, is there a way to add files (of and kinds, not only text) without using Monobehaviour? Thanks!