+3 votes

Hi, i working for mobile platforms.
This file location and File.WRITE working on Windows.

var file_location = "res://save_game.txt"
file.open_encrypted_with_pass(file_location, File.WRITE, OS.get_unique_ID())

But i need help, we how writing game data, Level manager, with godot engine for android platforms.


in Engine by (18 points)
edited by
Doesn't it work the same way on Android? "res" is independent on platform, isn't it?

1 Answer

+4 votes
Best answer

Try user:// instead, it is guaranteed to be writable.
res:// points to the directory where the game is installed, so in many cases (android, program files on windows without admin rights, etc..) it is not accessible.

Edit: see the Data paths tutorial

by (922 points)
selected by
user://data.bin = in mobile phone /data/data/org.godotengine.myprojename/files/data.bin

Thanks :)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.