SetAccountInfo [Player Network SDK Only]
[Player Network SDK Only] Set account information for custom accounts.
note
To create a custom account, the first step is to call SetAccountInfo to set necessary information. This method does not have a callback.
If you do not call this method first, and use other methods of creating your own account, an error message will be appear in the console.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void SetAccountInfo(string channel, int channelId, string langType, int accountPlatType, string extraJson = "{}");
static void SetAccountInfo(const std::string &channel, int32_t channelid, const std::string &lang_type, int32_t account_plat_type,
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| channel | string | Channel of a custom account, which is associated with the platform account, such as CustomAccount or EGame |
| channelId | int | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| langType | string | Language type (RFC 4646), such as "en". It defines the language used to send emails and SMS messages. For details, see Language Type Definition. |
| accountPlatType | int | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| extraJson | int | Extended information |
| Parameter | Type | Description |
|---|---|---|
| channel | std::string Refers to EINTLLoginChannel | Channel of a custom account, which is associated with the platform account, such as CustomAccount or EGame |
| channelid | int32_t | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| lang_type | std::string | Language type (RFC 4646), such as "en". It defines the language used to send emails and SMS messages. For details, see Language Type Definition. |
| account_plat_type | int32 | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| extra_json | std::string | Extended information |
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().SetAccountInfo("Self", 1, "en", 1);
GUA_NAMESPACE::GUAAccountService::SetAccountInfo("Self", 1, "en", 1);