SetAccountInfo
AndroidiOSWindows
If you were looking for the method for use with Unity, see SetAccountInfo for Unity SDK.
If you were looking for the method for use with Unity, see SetAccountInfo for Unity SDK.
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 to create your own account, an error message will be appear on the console.
caution
- After calling LevelInfinite.AutoLogin, do not call the old automatic login interface INTLAPI.AutoLogin, otherwise it will automatically log in twice.
- If the game is linked to a custom account, determine the local login status before calling automatic login. If the login status is a custom account, it is necessary to call
INTLAPI.SetAccountInfo
. (The channel information of the original custom account, where thelang_type
parameter and the above SetLanguage should remain consistent). If the local login status is another channel, there is no need to callSetAccountInfo
, becauseSetAccountInfo
has been called when LI PASS is initialized. If the game is not integrated to a custom account, ignore this note. - AutoLogin must be called after receiving
GN_READY
in theLevelInfinite.Init
callback.
Function definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool SetAccountInfo(
const EINTLLoginChannel Channel,
const int32 ChannelID,
const FString LangType,
const int32 AccountPlatType);
Input parameters
Parameter | Type | Description |
---|---|---|
Channel | EINTLLoginChannel | Channel of custom account, related to platform account, such as CustomAccount, EGame |
ChannelID | int32 | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
LangType | FString | 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 | int32 | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
Code sample
UINTLSDKAPI::SetAccountInfo(EINTLLoginChannel::kChannelCustomAccount, {YOUR_ACCOUNT_PLAT_TYPE}, "en", {YOUR_ACCOUNT_PLAT_TYPE});
- Replace {YOUR_ACCOUNT_PLAT_TYPE} with
ACCOUNT_PLAT_TYPE
.