Skip to main content

Set UI Root Node (SetUIRoot)

AndroidiOSWindows
If you are using the Unity engine, see SetUIRoot for Unity SDK.

Set the root node for all UI interfaces of LI PASS.

note

LI PASS UI design resolution is:
Android, iOS (landscape): 1334x750
Android, iOS (portrait): 750x1334
PC, PS5, XSX: 1920x1080
Switch: 1280x720

caution

After setting the UI root node, do not destroy the node, or the LI PASS UI interface cannot be mounted and unexpected behaviors may occur.

Function definition

UFUNCTION(BlueprintCallable, Category = "LevelInfinite")
static void SetUIRoot(UCanvasPanel* uiRoot);

Parameter Explanation

ParametersTypeExplanation
rootUCanvasPanelUI root

If the game's design resolution differs from the LI PASS design resolution, you can set the LI PASS UI scaling ratio in LevelInfiniteUIConst.lua (contact technical support for changes):

-- UI scaling ratio (business design resolution high / LI PASS design resolution high)
-- 1080 / 750
LevelInfiniteUIConst.UIRenderScale = 1.44

Code Sample

ULevelInfiniteAPI::SetUIRoot(uiRoot);