ModifyAccountWithLoginState [Player Network SDK Only]
[Player Network SDK Only] After logging in, modify the current account in the current login state.
Supported Platform
- 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
| Parameter | Type | Description |
|---|---|---|
| oldphoneAreaCode | string | Phone area code of the old account. If the account is registered with an email address, the field is left empty. |
| newAccount | string | New account |
| newAccountVerifyCode | string | Verification code of the new account |
| newphoneAreaCode | string | Phone area code of the new account. If the account is registered with an email address, the field is left empty. |
| extraJson | string | Extended information |
| Parameter | Type | Description |
|---|---|---|
| old_phone_area_code | std::string | The phone area code of the old account, fill in the blanks if the account is an email |
| new_account | std::string | New account |
| new_account_verify_code | std::string | Verification code of the new account |
| new_phone_area_code | std::string | Phone area code of the new account. If the account is registered with an email address, the field is left empty. |
| extra_json | std::string | Extended information |
Callback Processing
The callback processing API is GUAAccountResultObservers. The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents.
The callback methodID is GUA_ACCOUNT_MODIFY_ACCOUNT.
The callback event is OnAccountResultNotify.
The callback methodID is kMethodIDAccountModifyAccount.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ModifyAccountWithLoginState("886", "newAccount", "newAccountVerifyCode", "86");
GUA_NAMESPACE::GUAAccountService::ModifyAccountWithLoginState("886", "NewAccount", "NewAccountVerifyCode", "86");