跳到主要内容

Client PlayerBlobData API Reference

PGOS provides blob type PlayData to support the use of binary large objects in game.

API List

APIDescription
GetPBDInfoGet the player blob data information of the specified key.
UpdateMyPBDFromFileUpdate blob data of the current player from a local file.
CancelMyPBDUpdateCancel the blob data update operation of the current player.

API Details

GetPBDInfo

Get the player blob data information of the specified key.

/// <summary>Get the player blob data information of the specified key.</summary>
/// <param name="player_id">The player to query.</param>
/// <param name="blob_key">The blob key to query.</param>
public void GetPBDInfo(string player_id, string blob_key, OnGetPBDInfo callback);

Parameters:

ParamTypeDescription
player_idstringThe player to query.
blob_keystringThe blob key to query.
callbackOnGetPBDInfo

Return: void

UpdateMyPBDFromFile

Update blob data of the current player from a local file.

/// <summary>Update blob data of the current player from a local file.</summary>
/// <param name="blob_key">The blob key to update.</param>
/// <param name="file_path">The full path to the file to upload. If it is not a UE project (FString), please pass in a full local path (not in utf8 format).</param>
/// <param name="progress_callback">Data transfer progress callback, which will be called in an ASYNCHRONOUS CHILD THREAD.</param>
public void UpdateMyPBDFromFile(string blob_key, string file_path, OnUpdateMyPBDPro progress_callback, OnUpdateMyPBDFromFile callback);

Parameters:

ParamTypeDescription
blob_keystringThe blob key to update.
file_pathstringThe full path to the file to upload. If it is not a UE project (FString), please pass in a full local path (not in utf8 format).
progress_callbackOnUpdateMyPBDProData transfer progress callback, which will be called in an ASYNCHRONOUS CHILD THREAD.
callbackOnUpdateMyPBDFromFile

Return: void

CancelMyPBDUpdate

Cancel the blob data update operation of the current player.

/// <summary>Cancel the blob data update operation of the current player.</summary>
/// <param name="blob_key">The blob key to cancel the update.</param>
public void CancelMyPBDUpdate(string blob_key, OnCancelMyPBDUpdate callback);

Parameters:

ParamTypeDescription
blob_keystringThe blob key to cancel the update.
callbackOnCancelMyPBDUpdate

Return: void

All Delegates

public delegate void OnGetPBDInfo(PgosResult a0, PlayerBlobDataInfo a1);
public delegate void OnUpdateMyPBDFromFile(PgosResult a0);
public delegate void OnUpdateMyPBDPro();
public delegate void OnCancelMyPBDUpdate(PgosResult a0);

Type Reference: