system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
leg0 |
|
Old Version |
Published before Godot 3 was released. |
I was using res:// (project’s folder) to save my data but discovered that it doesn’t work for android
http://docs.godotengine.org/en/stable/tutorials/step_by_step/filesystem.html?highlight=user
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 !
system
4
|
|
|
|
Reply From: |
Zylann |
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?
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.
timoschwarzer | 2018-05-02 19:57
macos Catalina /Users//Library/Application Support/Godot
flurick | 2020-04-03 13:48
system
5
|
|
|
|
Reply From: |
Daniel Mircea |
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:
https://github.com/godotengine/godot/blob/master/platform/iphone/os_iphone.cpp#L479
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.