Skip to main content

Save Data

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

Call Information

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

Call Information Details

ParameterDescriptionType
storageKeyData keystring
storageValueData informationstring
isPrivateIf set to true, restricts access to the data from external players.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");
}
})
}
}

Communication Result

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