+2 votes

I was using res:// (project's folder) to save my data but discovered that it doesn't work for android


instead I needed to use user:// but I have no idea where it saves my data on my windows.

( same question for mac ? )

Doesn't user:// works on iOS ?

Thanks !

in Engine by (31 points)

2 Answers

0 votes

On Windows it is saved under C:\Users\yourname\AppData\Roaming\Godot\app_userdata\yourgame

On Linux I think it's somewhere in the home folder.

I don't know about other OSes, sorry. Maybe someone else do?

by (28,835 points)

On linux is a similar location, at ~/.godot/app_userdata/yourgame

Android not sure, somewhere on a Data directory, user data partition may depend on Android version.

On Mac OSX the location is the same as on Linux: ~/.godot/app_userdata/yourgame

With Godot 3 it is ~/.local/share/godot/app_userdata on Linux.

macos Catalina /Users//Library/Application Support/Godot

+2 votes

Disclaimer, I never owned an iphone and I'm a beginner in godot, but I'll attempt to untangle this.

The docs say that user:// is just an alias for OS.get_data_dir.

For example, this is how it handles the windows platform: https://github.com/godotengine/godot/blob/master/platform/windows/os_windows.cpp#L2355

However, it's quite different for ios:

String OSIPhone::get_data_dir() const {
    return data_dir;

At a glance, it looks like it expects a call fromset_data_dir (defined earlier in that file).

That method is not exposed to the gdscript api, it's just used internally, as evidenced here https://github.com/godotengine/godot/blob/0c80bc2579e6d3cc904f71dacde760f1081a9cb1/platform/iphone/app_delegate.mm#L123

OSIPhone::get_singleton()->set_data_dir(String::utf8([documentsDirectory UTF8String]));

Therefore I think it's safe to conclude that user:// is in the phone's documents folder.

by (84 points)
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 Frequently asked questions and 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.