TransferAccount [Player Network SDK Only]
[Player Network SDK Only] Transfers account data from other devices to the current account through the transfer code.
Supported Platform
- 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
Parameter | Type | Description |
---|---|---|
transferCode | string | Transfer code which specifies the account to be transferred |
password | string | The password set when generating the transfer code |
Parameter | Type | Description |
---|---|---|
transfer_code | std::string | Transfer code which specifies the account to be transferred |
password | std::string | The password set when generating the transfer code |
Callback Processing
The callback processing API is GUABaseResultObservers. The callback data structure is GUABaseResult.
- Unity
- Unreal Engine
The callback event is LoginBaseResultEvents
.
The callback methodID is GUA_ACCOUNT_TRANSFER_ACCOUNT
.
The callback event is OnBaseResultNotify
.
The callback methodID is kMethodIDAccountTransferAccount
.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().TransferAccount("transferCode", "password");
GUA_NAMESPACE::GUAAccountService::TransferAccount("TransferCode", "Password");