GetScreenSize
The size of the space the elements live in.
The height is always 1080; the width follows the screen’s shape (1920 on a 16:9 screen, 2560 on 21:9). Read it
when placing something against the right or the bottom edge - the answer changes with the window.
Syntax
Section titled “Syntax”GetScreenSize()Returns
Section titled “Returns”number, number - the width and the height
Example
Section titled “Example”local w, h = GetScreenSize()CreateUiText("clock", w - 40, 20, "12:00", COLOR_GOLD, 0.8, UI_ALIGN_RIGHT)See also
Section titled “See also”WorldToScreen · the The game’s UI for a script group of the index
