Question

does anyone know how would I create a file browser in Unity for an android OS? I don't actually know where to even start, even after I did a lot of search on it.

What I want, is for the user to be able to go through his folders on the phone or the SD card and he should be able to choose a text file, I would then save the text from the file into a string in my app and continue from there.

Thank you!

Was it helpful?

Solution

The file navigation is as simple as using the .net 2.0 file browsing functions.

http://msdn.microsoft.com/en-us/library/system.io%28v=vs.80%29.aspx

However you will have a lot of headaches trying to get Unity to play ball with Android's Intent broadcasters/receivers and will require a lot of fiddling with Java to launch the other Activity.

http://developer.android.com/training/basics/firstapp/starting-activity.html

OTHER TIPS

You might want to look into this: http://wiki.unity3d.com/index.php/ImprovedFileBrowser and its relevant forum post. You might need to modify the script to work on Android, but it should be a good start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top