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
Parameter | Description | Type |
---|---|---|
storageKey | Data key | string |
storageValue | Data information | string |
isPrivate | If set to true, restricts access to the data from external players. | 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");
}
})
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}