데이터 저장
플레이어/게임 환경 정보의 데이터를 안전하게 저장 합니다.
저장 된 게임 데이터는 콘솔에서 조회 할 수 있으며 데이터 추적을 활용하여 과거의 데이터 저장 내역도 확인 가능 합니다.
호출 정보
public void Save (string storageKey, string storageValue, bool isPrivate, PlayNANOODelegate callback) {}
호출 상세 정보
파라미터 | 설명 | 타입 |
---|---|---|
storageKey | 데이터 키 | string |
storageValue | 데이터 정보 | string |
isPrivate | 데이터 접근 제한 설정 시 외부 플레이어의 데이터 접근을 차단 합니다. | boolean |
callback | 통신 결과 | PlayNANOODelegate |
소스 코드
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");
}
})
}
}
통신 결과
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}