Class ScyllaUIGridItem
Per-child cell pin and span descriptor for a direct child of ScyllaUIGrid. When this component is absent the grid auto-flows the child into the next available cell, row by row. When attached, the child is placed at the explicit zero-based Column / Row coordinate and may occupy multiple tracks via ColumnSpan / RowSpan.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/UI/Layout/Grid Item")]
[DisallowMultipleComponent]
[RequireComponent(typeof(RectTransform))]
[ExecuteAlways]
public sealed class ScyllaUIGridItem : MonoBehaviour
Remarks
All coordinates are zero-based. Negative values are clamped to 0 by both
the property setters and the Inspector constraint. The solver additionally clamps
the trailing edge of a span to the last valid track so a child that specifies a
span larger than the remaining tracks is silently fitted rather than rejected.
Pinned children are placed before auto-flow children, so a pinned child does not displace already-placed auto-flow siblings. The occupancy bitmap used by auto-flow always skips cells already claimed by pinned children regardless of Inspector order.
Any property change marks the parent ScyllaUIGrid dirty and schedules a re-solve via MarkDirty().
Properties
Column
Zero-based column index at which this child is pinned. Values below zero are
clamped to 0 by the setter. The solver additionally clamps the value to
the last valid column so out-of-range assignments do not crash the grid.
Declaration
public int Column { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ColumnSpan
Number of consecutive column tracks this child occupies, starting at
Column. Always at least 1. The solver clamps the trailing
edge to the last available column so a span that would overflow the grid is
silently truncated rather than rejected.
Declaration
public int ColumnSpan { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Row
Zero-based row index at which this child is pinned. Values below zero are
clamped to 0 by the setter. The solver additionally clamps the value to
the last valid explicit row so out-of-range assignments do not crash the grid.
Declaration
public int Row { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
RowSpan
Number of consecutive row tracks this child occupies, starting at
Row. Always at least 1. The solver clamps the trailing
edge to the last available row so a span that would overflow the grid is
silently truncated rather than rejected.
Declaration
public int RowSpan { get; set; }
Property Value
| Type | Description |
|---|---|
| int |