Hi,
I have this file in my computer
StreamWriter writer = new StreamWriter (@ “C: \ Users \ Public \ Documents \ Unity Projects \ InterfaceInternship \ Assets \ File \ RisQuiz.txt”, true);
What is the path to insert for my device Android?
Thank
2 Answers
2you can use Application.persistentDataPath
Application.persistentDataPath have two paths base on your Write Access setting, you can find it at Build Setting > Player Setting > Other Settings, by default, it is internal Only. means that the path should be point to /data/data/com.your.appid/files which is for development only, user cannot find this files without root android device.
if you set the Write Access as External(SD Card) or add WRITE_ EXTERNAL_STORAGE permission into AndroidManifest.xml, Application.persistentDataPath will point to Android/file/com.your.appid/files of your sd card.
refer this link:
thank you so much, but so where do I move my file to my computer so that it is taken into the device afterwards?
thank you so much, but so where do I move my file to my computer so that it is taken into the device afterwards?
– russo95marco