- Home /
android browse and read text files
Hi everyone, I read a lot but nothing will help
In my project I have folders with sub-folders and containing txt-files. the amount of txt-files is dynamic it would be nice if the app ( android ) could browse the folders by it self an load an file
This means, I wont use Ressource.Load because the program should decide it, which txt file should be loaded the functions Application.persistentDataPath and Application.dataPath wont point me to the "right" txt-folder, especially there isnt a folder at this path
where is my "lovely" folder wich I created in Unity and how can I access it on android ?
after hours of trying and searching I hope you could help me
thank a lot !
I'm not sure if this works on Android but have your tried converting the txt to xml and using an xmlreader?
http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx
no i haven't mh .. actually I don't need xml files parsing cost time and cpu :\
Answer by hvilela · Sep 26, 2012 at 08:21 PM
I would recommend to use a XML, JSON or even a simple TXT file just to describe your folder/file structure. So you can read this file when your app start and based on the content you can use Resource.Load to load any specific file.
no problem :) the thing is, now i have to define which files are there to load, with the index-file but i would search my pre created ( in unity ) folder for files which are stored in there, without an index file
Your answer
Follow this Question
Related Questions
How to tell android to open a file 0 Answers
Get Contents of Folder Using UnityWebRequest 0 Answers
Save a reachable file on the android device 1 Answer
[Android] Resources folder: number of files limit? 0 Answers
Files on mobile devices 0 Answers