Gamebase SDK for Unity  1.14.2
Toast Gamebase Platform

◆ IssueTransferKey()

static void IssueTransferKey ( long  expiresIn,
GamebaseCallback.GamebaseDelegate< GamebaseResponse.Auth.TransferKeyInfo >  callback 
)
static

If you want to transfer an account that is guest to other device.

You can use this method to publish an key that called TransferKey. To publish TransferKey, an account must be logged in by Guest. After transfering guest account to other device, guest account on this device will be logged out and will not be able to authenticate with same guest account.

Since
Added 1.9.0.
Parameters
expiresInTransferKey is valid for expiresIn value in seconds.
callbackHandler to receive transferKey, regDate, expireDate and errors.

Example Usage :

public void IssueTransferKey(long expiresIn)
{
Gamebase.IssueTransferKey(expiresIn, (transferKeyInfo, error) =>
{
if (true == Gamebase.IsSuccess(error))
{
Debug.Log(string.Format("transferKey:{0}", transferKeyInfo.transferKey));
Debug.Log(string.Format("regDate:{0}", transferKeyInfo.regDate));
Debug.Log(string.Format("expireDate:{0}", transferKeyInfo.expireDate));
}
else
{
Debug.Log(string.Format("IssueTransferKey failed. error is {0}", error));
}
});
}