I store information in files and load it into the menu. Files stored in both Application.temporaryCachePath and Application.persistentDataPath . On the computer, everything worked, with the build and the launch on the android files were not there!

Then I was told that the temporaryCachePath files are temporary, and therefore may not work, and in persistentDataPath may be problems with access. I used TextAsset pathTxt = (TextAsset)Resources.Load("LvlLocker", typeof(TextAsset)); resource loading, again on the computer works, on the android files are not. Tell me how to make a file on my computer so that it is transferred to the android and I can read it calmly. There is no power, I can’t transfer one file to a phone all day and count one number !!

  • Before transferring the application to your phone, check the manifest. Perhaps it does not have permission to access the file system. I use Application.persistentDataPath, but on winphone. Maybe the matter is connected with the manifesto. - DarkOwl
  • @ nuts119 although there was External SD in the settings of the player on Write Acces, I did not find it in the manifest, and added <uses-permission android: name = "android.permission.WRITE_EXTERNAL_STORAGE" />. Nothing helped. But in the player settings in the Optimization - Preloaded Assets item, I added my files from the Resources folder, and they started being transferred to the phone. With DataPath and CachePath, the problem did not resolve. If I generate the file directly in the code, then everything works, but if I just want it to be transferred from the computer and only read in the code, they are not transferred. - Leon Barakuda

1 answer 1

As I remember Android, iOS, WP. Cannot read files. I then used the registry via Player.Prefs .

  • Try to write more detailed answers. Explain what is the basis of your statement? - Nicolas Chabanovsky