查询玩家数据
查询其他玩家数据。
调用信息
public void PlayerDataLoad (string playerUserUniqueId, string storageKey, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| playerUserUniqueId | 玩家ID | string |
| storageKey | 玩家数据键 | string |
| callback | 通信结果 | PlayNANOODelegate |
源代码
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.Storage.PlayerDataLoad("PLAYER_ID", "STORAGE_KEY", (state, error, jsonString, values) => {
if (state.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["PlayerId"]);
Debug.Log(values["StorageKey"]);
Debug.Log(values["StorageValue"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
通信结果
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"PlayerId" : "String",
"StorageKey" : "String",
"StorageValue" : "String"
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| PlayerId | 玩家ID | string |
| StorageKey | 存储数据键 | string |
| StorageValue | 存储数据信息 | string |