跳到主要内容

注册并登录(Register)[仅限 Player Network SDK]

[仅限 Player Network SDK] 注册并登录账号。

支持的平台

支持Android, iOS, Windows 平台。

函数定义

void Register(
string account,
string password,
string verifyCode,
string phoneAreaCode,
GUAAccountProfile userProfile,
string extraJson = "{}");

入参说明

注意

请注意用户名和密码的规则

参数类型说明
accountstring账号,可用邮箱和手机号注册
passwordstring更多信息,请参见 密码规则
verifyCodestring验证码
phoneAreaCodestring手机区域码例如中国为"86",如果账号为邮箱则填空。
userProfileGUAAccountProfile账号的个人信息,包含,用户名,生日,国家地区等。
extraJsonstring扩展信息

回调处理

回调处理接口是 GUALoginResultObservers。回调数据结构是 GUALoginResult

回调事件是 LoginResultEvents。 回调 ID 是 GUA_ACCOUNT_REGISTER

代码示例

GUAAccountProfile accountProfile = new GUAAccountProfile();
// TODO: Set accountProfile
UnionAdapterAPI.GetAccountService().Register("account", "password", "verifyCode", "86", accountProfile);