Skip to main content

Register and log in (Register) [Player Network SDK only]

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

Supported platforms

Supports Android, iOS, Windows platform.

Function Definition

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

Input Parameters

note

Please refer to the rules for username and password.

ParametersTypeDescription
accountStringAccount, Can be registered using an email or phone number
passwordStringFor more information, see Password Guidelines.
verifyCodeStringVerification Code
phoneAreaCodeStringPhone Area Code: For example, China is "86". Leave empty if the account is an email.
userProfileGUAAccountProfileAccount Personal Information: Includes username, date of birth, country/region, etc.
extraJsonstringExtended Information

Observers

The callback handler interface is GUALoginResultObservers.The callback data structure is GUALoginResult.

The callback event is LoginResultEvents. The callback ID is GUA_ACCOUNT_REGISTER.

Code sample

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