Modify account with current login state (ModifyAccountWithLoginState) [Player Network SDK only]
[Player Network SDK only] After logging in, you can use the current login state to modify the account.
Supported platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void ModifyAccountWithLoginState(
string oldPhoneAreaCode,
string newAccount,
string newAccountVerifyCode,
string newPhoneAreaCode,
string extraJson = "{}" );
static void ModifyAccountWithLoginState(
const std::string &old_phone_area_code,
const std::string &new_account,
const std::string &new_account_verify_code,
const std::string &new_phone_area_code,
const std::string &extra_json = "{}" );
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| oldphoneAreaCode | string | Phone area code for the old account.If the account is registered via email, this will be empty. |
| newAccount | string | New account |
| newAccountVerifyCode | string | Verification code for new account |
| newphoneAreaCode | string | Phone area code for the new account.If the account is registered via email, this will be empty. |
| extraJson | string | Extended information |
| Parameters | Type | Description |
|---|---|---|
| old_phone_area_code | std::string | Phone area code for the old account, leave blank if the account is an email. |
| new_account | std::string | New account |
| new_account_verify_code | std::string | Verification code for new account |
| new_phone_area_code | std::string | Phone area code for the new account.If the account is registered via email, this will be empty. |
| extra_json | std::string | Extended information |
Callback Handling
The callback processing interface is GUAAccountResultObservers.The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents. The callback ID is GUA_ACCOUNT_MODIFY_ACCOUNT.
The callback event is OnAccountResultNotify. The callback ID is kMethodIDAccountModifyAccount.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ModifyAccountWithLoginState("886", "newAccount", "newAccountVerifyCode", "86");
GUA_NAMESPACE::GUAAccountService::ModifyAccountWithLoginState("886", "NewAccount", "NewAccountVerifyCode", "86");