How to do in Unity 3D
read a arquivo txt
line by line and store in a vector using C #.
Well, I was able to manipulate arquivo .txt
, however in Android
it does not work.
Follow the code I used.
int counter;
string line;
string[] teste = new string[10];
System.IO.StreamReader file;
file = new StreamReader("nome_do_arquivo.txt");
while ((line = file.ReadLine()) != null)
{
teste[counter] = line;
counter++;
}
file.Close();
This code for pc solves my problem, however I need to Android , compiling to Android this method does not work, it's as if it does not take% along with .txt
.
Another question, in Apk
used Unity 3D
to C#
, how to manipulate txt files?