Skip to main content

Register [Player Network SDK Only]

[Player Network SDK Only] Register and log in to the account.

Supported Platform​

Supports Android, iOS, Windows platform.

Function Definition​

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

Input Parameters​

note

Take note about the username and password rule.

ParameterTypeDescription
accountstringAccount, which can be registered with an email address or phone number.
passwordstringPassword. For more information, see Password Rules.
verifyCodestringVerification code
phoneAreaCodestringPhone area code, such as "86" for China. If you register an account with an email address, the field is left empty.
userProfileGUAAccountProfilePersonal information, such as user name, birthday and more.
extraJsonstringExtended information

Callback Processing​

The callback processing API is GUALoginResultObservers. The callback data structure is GUALoginResult.

The callback event is LoginResultEvents. The callback methodID is GUA_ACCOUNT_REGISTER.

Code Sample​

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