Answer the question
In order to leave comments, you need to log in
How to read/create text files while playing Unity (Android)?
Hello. I connect System.IO on the computer and write something like this:
string path = "Assets/Resources/text1.csv";
string content = new StreamReader(path).ReadToEnd();
Answer the question
In order to leave comments, you need to log in
Because this file is not even on the computer after assembly, it is in the resources and it must be read accordingly through Resources.Load("text1")
.
https://docs.unity3d.com/Manual/class-TextAsset.html
PS. and you will have to rename it to text1.csv.txt
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question