Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

GridLine

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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).

The value is sign-encoded into a single blittable int so it mirrors the native field 1:1: 0 = auto, > 0 = line, < 0 = span(-value). This mirrors how aspect-ratio uses a sentinel value rather than a separate flag.

Static Properties

Property Description
Auto auto: the edge is resolved by grid auto-placement.

Properties

Property Description
isAutoWhether this value is auto.
isLineWhether this value is an explicit line.
isSpanWhether this value is a span.
lineThe 1-based line index when GridLine.isLine is true; otherwise 0.
placementWhich kind of placement this value represents.
spanThe span count when GridLine.isSpan is true; otherwise 0.

Public Methods

Method Description
ToStringThe USS text form: auto, span <n>, or the line number.

Static Methods

Method Description
AtLineAn explicit 1-based grid line.
SpanA span of count tracks from the opposite edge.

Operators

Operator Description
GridLineConverts a positive integer to an explicit line; 0 and negatives throw.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961