Skip to main content

Save Data

Safely stores player/game environment data. Stored game data can be viewed in the console, and past data storage history can also be checked using data tracking.

Call Information

public void Save (string storageKey, string storageValue, bool isPrivate, PlayNANOODelegate callback) {}

Call Details

ParameterDescriptionType
storageKeyData keystring
storageValueData valuestring
isPrivateWhen data access restriction is enabled, it blocks external players from accessing the data.boolean
callbackCommunication resultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

plugin.Storage.Save("storageKey", "storageValue", "isPrivate", (state, error, jsonString, values) => {
if (state.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
}
else
{
Debug.Log("Fail");
}
})
}
}

Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}