Search code examples
androiddatabasefilestoregodot

Godot, why does my android export not find/ open files?


I am building an app with a shop system. This involves storing the users coins and what guns they own in files, which work perfectly fine on my PC, but on android. I save the files using the "user://" notation and it still doesn't work on my phone.

Strangely, the weapon loading script uses a file to load the users preference, and that works fine on my phone, just not displaying coins etc. All these files are created the same way.

I have already added the files to the export exceptions list as well (.dat files, I have tried txt as well.) Any help? thanks


Solution

  • Turns out I had to clear the saved file on my PC, then export it to android. I think my phone was trying to find the file using the PC's file path as that's what is was set up to do (but after deleting the data file then exporting, my phone created a new one in a place it could actually access.)