Gamebase SDK for Unity 2.74.0 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ IssueTransferAccount()

static void IssueTransferAccount | ( | GamebaseCallback::GamebaseDelegate< GamebaseResponse::Auth::TransferAccountInfo > | callback | ) |
| static

Try to issue the transfer account.

Since
  Added 2.2.0.

Parameters

  callback | Callbacks the result of IssueTransferAccount

Example Usage :

public void IssueTransferAccountSample()
{
Gamebase.QueryTransferAccount((transferAccountInfo, error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
// You already have ID/password for account transfer.
var id = transferAccountInfo.account.id;
Debug.Log(string.Format("QueryTransferAccount succeeded. ID:{0}", id));
}
else
{
if (error.code == GamebaseErrorCode.AUTH_TRANSFERACCOUNT_NOT_EXIST)
{
IssueTransferAccount();
return;
}
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("QueryTransferAccount failed. error is {0}", error));
}
});
}
public void IssueTransferAccount()
{
Gamebase.IssueTransferAccount((transferAccountInfo, error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
var id = transferAccountInfo.account.id;
var password = transferAccountInfo.account.password;
Debug.Log(string.Format("IssueTransferAccount succeeded. ID:{0}, Password:{1}", id, password));
}
else
{
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("IssueTransferAccount failed. error is {0}", error));
}
});
}
Toast.Gamebase.Gamebase.QueryTransferAccount
static void QueryTransferAccount(GamebaseCallback.GamebaseDelegate< GamebaseResponse.Auth.TransferAccountInfo > callback)
Try to query the transfer account to Gamebase.
Definition: Gamebase.cs:1491
Toast.Gamebase.Gamebase.IsSuccess
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition: Gamebase.cs:57
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition: Gamebase.cs:11