Cloud saves use the Remote Storage API: per-player files in the cloud, synced across devices. The SDK methods are named uploadRemoteFile, downloadRemoteFile, and similar.
Upload and download files
func save_to_cloud(file_name: String):
var path = OS.get_user_data_dir() + "/" + file_name
WavedashSDK.upload_remote_file(path)
func load_from_cloud(file_name: String):
var path = OS.get_user_data_dir() + "/" + file_name
WavedashSDK.download_remote_file(path)
Godot: Pass absolute paths under OS.get_user_data_dir(). The cloud save API rejects user:// virtual paths.
Directories
func download_save_folder():
var path = OS.get_user_data_dir() + "/saves/"
WavedashSDK.download_remote_directory(path)
func list_remote_saves():
var path = OS.get_user_data_dir() + "/saves/"
WavedashSDK.list_remote_directory(path)
File metadata
interface RemoteFileMetadata {
exists: boolean;
key: string;
name: string;
lastModified: number;
size: number;
etag: string;
}
Path conventions
Use forward slashes in remote keys, even on Windows builds.
saves/slot1.json
settings.json
replays/run-001.dat
Remote keys are relative to the player root. Keep names short and stable so you can migrate formats later.
Full save system example
const SAVE_VERSION = 2
var save_root: String
func _ready():
save_root = OS.get_user_data_dir() + "/saves/"
func cloud_save(slot: int, game_state: Dictionary) -> void:
var payload = {"version": SAVE_VERSION, "timestamp": Time.get_unix_time_from_system(), "state": game_state}
var path = save_root + "slot" + str(slot) + ".json"
DirAccess.make_dir_recursive_absolute(save_root)
var file = FileAccess.open(path, FileAccess.WRITE)
file.store_string(JSON.stringify(payload))
file.close()
WavedashSDK.upload_remote_file(path)
func cloud_load(slot: int) -> void:
var path = save_root + "slot" + str(slot) + ".json"
WavedashSDK.download_remote_file(path)