Set up custom account information (SetAccountInfo)
To create a custom account, first call SetAccountInfo to set necessary information.This method has no callback.If you don't call this method first, and use other methods to create a custom account, an error message will appear on the console.
caution
- After calling LevelInfinite.AutoLogin, do not call the old auto-login interface INTLAPI.AutoLogin; otherwise, auto-login will execute twice.
- If the game is linked to a custom account, ensure the local login status before calling auto-login.If the login status is a custom account,
INTLAPI.SetAccountInfoneeds to be invoked.(The channel information of the original self-built account; thelang_typeparameter should be consistent with the above SetLanguage.)If the local login status is another channel, there's no need forSetAccountInfosince it was called during LI PASS initialization.Ignore this note if the game hasn't integrated with a custom account. - AutoLogin must be called in the callback of
LevelInfinite.Initafter receivingGN_READY.
Function Definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool SetAccountInfo(
const EINTLLoginChannel Channel,
const int32 ChannelID,
const FString LangType,
const int32 AccountPlatType);
Input Parameters
| Parameters | Type | Explanation |
|---|---|---|
| Channel | EINTLLoginChannel | Self-built account channel, related to platform account, such as CustomAccount, EGame |
| ChannelID | int32 | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| LangType | FString | Language type (RFC 4646), e.g., "en".Used to define the language for sending emails and SMS For details, see Language Type Definition. |
| AccountPlatType | int32 | ACCOUNT_PLAT_TYPE assigned by Player Network Console |
Code example
UINTLSDKAPI::SetAccountInfo(EINTLLoginChannel::kChannelCustomAccount, {YOUR_ACCOUNT_PLAT_TYPE}, "en", {YOUR_ACCOUNT_PLAT_TYPE});
- Replace
{YOUR_ACCOUNT_PLAT_TYPE}withACCOUNT_PLAT_TYPE.