用当前登录态修改账号(ModifyAccountWithLoginState)[仅限 Player Network SDK]
[仅限 Player Network SDK] 登录之后,可以用当前的登录态修改当前的账号。
支持的平台
- Unity
- Unreal Engine
支持
Android, iOS, Windows 平台。支持
Android, iOS, Windows 平台。函数定义
- 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 = "{}");
入参说明
- Unity
- Unreal Engine
| 参数 | 类型 | 说明 |
|---|---|---|
| oldphoneAreaCode | string | 旧账号的手机区域码。如果账号为邮箱注册,则为空。 |
| newAccount | string | 新账号 |
| newAccountVerifyCode | string | 新账号的验证码 |
| newphoneAreaCode | string | 新账号的手机区域码。如果账号注册为邮箱,则为空。 |
| extraJson | string | 扩展信息 |
| 参数 | 类型 | 说明 |
|---|---|---|
| old_phone_area_code | std::string | 旧账号的手机区域码,如果账号为邮箱则填空。 |
| new_account | std::string | 新账号 |
| new_account_verify_code | std::string | 新账号的验证码 |
| new_phone_area_code | std::string | 新账号的手机区域码。如果账号注册为邮箱,则为空。 |
| extra_json | std::string | 扩展信息 |
回调处理
回调处理接口是 GUAAccountResultObservers。回调数据结构是 GUAAccountResult。
- Unity
- Unreal Engine
回调事件是 AccountEvents 。 回调 ID 是 GUA_ACCOUNT_MODIFY_ACCOUNT。
回调事件是 OnAccountResultNotify 。 回调 ID 是 kMethodIDAccountModifyAccount。
代码示例
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ModifyAccountWithLoginState("886", "newAccount", "newAccountVerifyCode", "86");
GUA_NAMESPACE::GUAAccountService::ModifyAccountWithLoginState("886", "NewAccount", "NewAccountVerifyCode", "86");