Skip to main content

Customize UI Scale Ratio

Player Network allows you to adjust the scale ratio of the LEVEL INFINITE PASS login panel, to match the UI design of your game client. Follow the instructions in this article to customize the login screen using SetUICustomScale for your game client.

note

Currently, the UI scale ratio can only be adjusted for Unreal Engine on LEVEL INFINITE PASS.

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

Background

The scale ratio for SetUICustomScale is calculated based on comparing the shortest sides of the game's design resolution and LEVEL INFINITE PASS's design resolution. Unreal Engine then uses this ratio with its DPI scaling curve to adapt the UI to different screen resolutions.

For example, on mobile platforms where games typically use a 1920x1080 design resolution while LEVEL INFINITE PASS uses 1334x750, the recommended scale ratio would be 1080/750 = 1.44, which is taken to be the parameter value for SetUICustomScale.

If SetUICustomScale is not called, LEVEL INFINITE PASS cannot determine the game's design resolution. In this case, the reciprocal of the scale value of LEVEL INFINITE PASS's design resolution on the DPI curve will be used as the scale ratio.

For optimal results, your game's DPI scaling curve should approximate a straight line with a consistent slope, as shown in the image below. The closer your game's DPI curve matches this pattern, the closer the ideal scale ratio will be to the reciprocal of the scale value (1/750 for mobile platforms).

Image: LIPassUEUIScaleRatio

Function

UFUNCTION(BlueprintCallable, Category = "LevelInfinite")
static void SetUICustomScale(const float scale);

Parameters

ParameterTypeDescription
scalefloatUI scale ratio

Sample

// set UI custom scale
ULevelInfiniteAPI::SetUICustomScale(1.44f);