Init
AndroidiOSWindows
Deprecated since: LI PASS V1.06.00
If you were looking for the method for use with Unity, see Init for Unity SDK.
Deprecated since: LI PASS V1.06.00
If you were looking for the method for use with Unity, see Init for Unity SDK.
It is recommended to initialize LI PASS when starting the game.
- For LI PASS V1.06 to LI PASS V1.15, see
InitLI
. - For LI PASS V1.16 and above, see
InitLIP
.
Function definition
UFUNCTION(BlueprintCallable, Category = "LevelInfinite")
static int Init(UGameInstance* instance, const FString &host, const FLIUserData& userData, bool isTest);
Input parameters
Parameter | Type | Description |
---|---|---|
instance | UGameInstance | UE GameInstance |
host | FString | Production environment URL: https://sg-vas.intlgame.com Test environment URL: https://test-vas.intlgame.com |
userData | FLIUserData | The rule must be consistent with the rule configured on Player Network Console to get the correct resources For more information, see UserData. |
isTest | bool | It doesn't affect the LI PASS environment, and the game doesn't need to worry about it. Just pass false |
UserData structure
Parameter | Type | Description |
---|---|---|
GameId | int | Actual Game ID |
ChannelId | string | LI PASS channel ID 131 |
OpenID | string | OpenID Hardcode it to FFFFFFFFFFFFFF |
LangType | string | Language type which affects multi-language UI display, pass as required |
Region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria |
AppVersion | string | App Version |
Other parameters do not have special requests, pass the value when available.
Code sample
FString host = TEXT("https://test-vas.intlgame.com");
FLIUserData userData = GetUserData();
ULevelInfiniteAPI::Init(GetGameInstance<UGameInstance>(), host, userData, false);