15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unity StreamingAssets 備忘録

15
Posted at

■Android実機内ではApplication.streamingAssetsPathはつかえない。

 Assets/StreamingAssets の直下にFileList.txtを置いた場合、
 下記のようなパスにしないと取得できない

こちらのサイトを参考にしました。
 http://halcyonsystemblog.blog.fc2.com/blog-entry-78.html

TextReader txtReader;
string description = "";
string txtBuffer = ""; 
string textFileName = "FileList.txt";
string path = "jar:file://" + Application.dataPath + "!/assets" + "/" + textFileName;
WWW www = new WWW(path);
yield return www; 
        
txtReader = new StringReader(www.text);
while ((txtBuffer = txtReader.ReadLine()) != null)
{
    description = description + txtBuffer + ",";
}
15
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?