Reference des fonctions
Godot 4 · GDScript · Setup & session
set_save_secret
Optional: folds your own secret into the local save's encryption key.
Synchronous (returns directly)
Signature
set_save_secret(secret: String) -> voidWhat it does
The local save is always encrypted and signed with a device-bound key derived from your game_id, api_key and the device id. This call mixes in your own secret on top, so a copied save cannot be read without it.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| secret | String | required | An extra secret string mixed into the key that encrypts the local save. |
How to call it
Optional. If you use it, call it BEFORE set_controller(), since the secret must be set before the save is read.
Returns: void
Example
Gamdato.set_save_secret("my-extra-secret")
Gamdato.set_controller("YOUR-GAME-ID", api_key)Use cases
- Add a second factor to local-save tamper protection beyond the built-in device key.