title: how to read text files on android builds for Unity?
body: <p>I've been having a lot of trouble trying to read text files stored in the StreamingAsset folder on my Android phone when I build the game as an .apk file.</p>
  
  <p>I know that for Android you have to use a different path to access the files by using</p>
  
  <pre><code>"jar:file://" + Application.dataPath + "!/assets" + fileName;
  </code></pre>
  
  <p>and store it into the WWW class. I have tried many ways but nothing seems to work for me as I am totally lost right now. My code looks like this:</p>
  
  <pre><code>void Awake(){
      string filePath = "jar:file://" + Application.dataPath + "!/assets" + fileName;
      // Reads our text file and stores it in the array
  
      string[][] Level = readFile (filePath);
  }
  
  // Reads our level text file and stores the information in a jagged array, then returns that array
  string[][] readFile(string file){
      WWW loadFile = new WWW (file);
      while (!loadFile.isDone) {}
      string text = System.IO.File.ReadAllText(loadFile.text);
      string[] lines = Regex.Split(text, "\r\n");
      int rows = lines.Length;
  
      string[][] levelBase = new string[rows][];
      for (int i = 0; i &lt; lines.Length; i++)  {
          string[] stringsOfLine = Regex.Split(lines[i], " ");
          levelBase[i] = stringsOfLine;
      }
      return levelBase;
  }
  </code></pre>