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
| Parameter | Description | Type |
|---|---|---|
| storageKey | Data key | string |
| storageValue | Data value | string |
| isPrivate | When data access restriction is enabled, it blocks external players from accessing the data. | boolean |
| callback | Communication result | PlayNANOODelegate |
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"
}