Skip to main content
Version: SDK-5.11.2

SelectCharacter

public BackendReturnObject SelectCharacter(string uuid, string inDate);

Parameters

ValueTypeDescription
uuidstringuuid of the owned character
inDatestringinDate of the owned character

Description

An attempt is made to log in to your character with matching uuid and inDate.
If successful, you will be logged in, and you can call BACKND Base.

Example

Synchronous

var bro = Backend.MultiCharacter.Character.GetCharacterList();

// 0th user
LitJson.JsonData characterJson = bro.GetReturnValuetoJSON()["characters"][0];

string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();

var bro2 = Backend.MultiCharacter.Character.SelectCharacter(uuid, inDate);

if(bro2.IsSuccess()) {
Debug.Log("Login successful");
}
else {
Debug.LogError("Failed to log in " + bro2.ToString());
}

Asynchronous

Backend.MultiCharacter.Character.GetCharacterList(callback => {
if(callback.IsSuccess()) {
// 0th user
LitJson.JsonData characterJson = callback.GetReturnValuetoJSON()["characters"][0];

string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();

Backend.MultiCharacter.Character.SelectCharacter(uuid, inDate, callback2 => {
if(callback2.IsSuccess()) {
Debug.Log("Deleted : " + callback2.ToString());
}
else {
Debug.LogErorr("Failed to delete : " + callback2.ToString());
}
);
}
});

SendQueue

SendQueue.Enqueue(Backend.MultiCharacter.Character.GetCharacterList, callback => {
if(callback.IsSuccess()) {
// 0th user
LitJson.JsonData characterJson = callback.GetReturnValuetoJSON()["characters"][0];

string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();

SendQueue.Enqueue(Backend.MultiCharacter.Character.SelectCharacter, uuid, inDate, callback2 => {
if(callback2.IsSuccess()) {
Debug.Log("Deleted : " + callback2.ToString());
}
else {
Debug.LogErorr("Failed to delete : " + callback2.ToString());
}
);
}
});

ReturnCase

Success cases

When the login succeeds
statusCode : 200
message : Success

Error cases

When uuid or inDate is null or string.Empty
statusCode : 400
errorCode : ValidationException
message : uuid is null or empty or inDate is null or empty

When uuid and inDate do not match
statusCode : 404
errorCode : NotFoundException
message : gamer not found, gamer cannot be found