Skip to main content

SetUIRoot

AndroidiOSWindows
If you were looking for the method for use with Unity, see SetUIRoot for Unity SDK.

Set the root for all LI PASS UIs.

note

LI PASS UI resolution:
Android, iOS (Landscape): 1334x750
Android, iOS (Portrait): 750x1334
PC, PS5, XSX: 1920x1080
Switch: 1280x720

caution

After setting the UI root node, please do not destroy it, otherwise the LI PASS UI interface cannot be mounted and will result in unexpected behavior.

Function definition

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

Input parameters

ParameterTypeDescription
rootUCanvasPanelUI root

If the game resolution is different from the LI PASS resolution, set the LI PASS UI scaling ratio in LevelInfiniteUIConst.lua (or contact the tech support to update):

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

Code sample

ULevelInfiniteAPI::SetUIRoot(uiRoot);