Unity Engine documentation Script Reference UnityEngine UnityEngine.UIElements GridLine A single placement value for grid-column-start, grid-column-end, grid-row-start and grid-row-end: auto, an explicit line (an integer \>= 1), or span <n> (n \>= 1).
Read time 1 minute
Last updated 6 days ago Definition
public readonly struct GridLine : IEquatable<GridLine>
The value is sign-encoded into a single blittable int so it mirrors the native field 1:1:
= auto,
= line,
= span(-value). This mirrors how aspect-ratio uses a sentinel value rather than a separate flag.
Properties
Property Description isAuto Whether this value is . isLine Whether this value is an explicit line. isSpan Whether this value is a span. line The 1-based line index when _isLine is true; otherwise 0. placement Which kind of placement this value represents. span The span count when _isSpan is true; otherwise 0.
Static Properties
Property Description Auto : the edge is resolved by grid auto-placement.
Methods
Method Description ToString The USS text form: , , or the line number.
Static Methods
Method Description AtLine An explicit 1-based grid line. Span A span of tracks from the opposite edge.
Operators
Operator Description GridLine Converts a positive integer to an explicit line; 0 and negatives throw.