Account Transfer by Transfer Code [Player Network SDK Only]
[Player Network SDK Only] Transfer the account from another device to the current account using a transfer code.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void TransferAccount(string transferCode, string password);
static void TransferAccount(const std::string &transfer_code, const std::string &password);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| transferCode | string | Transfer code specifying the account to be transferred |
| password | string | The password set when generating the transfer code |
| Parameters | Type | Description |
|---|---|---|
| transfer_code | std::string | Transfer code specifying the account to be transferred |
| password | std::string | The password set when generating the transfer code |
Callback Handling
The callback handler interface is GUABaseResultObservers.The callback data structure is GUABaseResult.
- Unity
- Unreal Engine
The callback event is LoginBaseResultEvents. The callback ID is GUA_ACCOUNT_TRANSFER_ACCOUNT.
The callback event is OnBaseResultNotify. The callback ID is kMethodIDAccountTransferAccount.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().TransferAccount("transferCode", "password");
GUA_NAMESPACE::GUAAccountService::TransferAccount("TransferCode", "Password");