Record Score
Records player score and register with the leaderboard service.
Player score may vary slightly depending on the leaderboard record type set in the console.
Call Information
public void Record (string tableCode, string recordId, double score, string extraData, PlayNANOODelegate callback)
Call Information Details
Parameter | Description | Type |
---|---|---|
tableCode | Table Code | string |
recordId | Record ID (e.g. Player ID) | string |
score | Recorded score | double |
extraData | Additional data | string |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.LeaderboardManagerV20240301.Record(tableCode, recordId, score, extraData, (status, errorCode, jsonString, values) => {
if (status.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": "success"
}
Communication Result
Data Key | Description | Type |
---|---|---|
Status | Operation result | string |