UDim
Combines parent-relative scale and pixel offset for one axis.
Behavior
UDim stores a scale and offset. A resolved measurement is the parent dimension
multiplied by Scale, plus Offset pixels. Two UDim values form a
UDim2.
Summary
Constructors1
Members2
Constructors
new
UDim.new(scale: number?, offset: number?): UDimCreates a dimension from scale and offset, in that order.
Properties
Offset
UDim.Offset: numberThe pixel offset added to the scaled dimension. Read-only.
Scale
UDim.Scale: numberThe fraction of the parent dimension. Read-only.
Operators
__add · __eq · __sub · __tostring · __type
Example
local halfWithPadding = UDim.new(0.5, -8)Used by
Stack · UICorner · UIListLayout · UIPadding