Back to API Reference
Class

IndentModifier

Adds left indentation that begins where the tag opens and persists across wrapped lines until the tag closes.

Remarks

Two complementary mechanisms produce a continuous visual indent: Every line whose first codepoint falls inside the tagged range is pushed right by the resolved value (line-start margin). If the tag opens in the middle of a line (i.e. the codepoint preceding the tag is not a mandatory line break), the advance of that previous codepoint is widened by the indent so that content following the open boundary visibly shifts right within the current line. As soon as the tag closes, subsequent codepoints carry no extra indent, so the next line wraps back to the container edge. Indents from overlapping or nested ranges accumulate, so writing <indent=1em>outer <indent=1em>inner</indent></indent> indents the inner content by two ems. Negative values pull the line back, which can be used to outdent a nested run or to balance an outer indent. Parameter — single value with optional unit: 20 or 20px — layout units; like every other UniText geometric modifier these scale together with auto-sized text. 1.5em — multiplied by the current shaping font size. 10% — fraction of the host RectTransform's width, resolved into render space using the active glyph scale so the on-screen indent stays at the requested percentage with or without auto-size. Ignored when the rect has no finite width. +5 / -5 — explicit delta. Functionally identical to the unsigned form because indents always compose additively.
protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void OnApply()