Struct ScyllaUITrack
One column or row track definition for ScyllaUIGrid. Combines a ScyllaUITrackSizingMode with the values that mode requires (explicit size for Fixed, fractional weight for Fractional, a min/max pair for MinMax).
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct ScyllaUITrack
Remarks
Only the fields relevant to the chosen Mode are consulted by the
solver. The struct is fully serializable so a grid's
List<ScyllaUITrack> renders cleanly in the Inspector.
Fields
FixedSize
Explicit size applied when Mode is Fixed. The track resolves to exactly this value regardless of available grid space or child content. May be expressed as absolute pixels or as a percent of the grid's resolved dimension on the same axis. Ignored by the solver for all other modes.
Declaration
public ScyllaUILength FixedSize
Field Value
| Type | Description |
|---|---|
| ScyllaUILength |
FractionalWeight
Fractional weight used when Mode is Fractional. Tracks split remaining space proportionally to this weight.
Declaration
[Min(0)]
public float FractionalWeight
Field Value
| Type | Description |
|---|---|
| float |
MaxSize
Upper bound of the content-clamp range used when Mode is MinMax. The solver computes the track's natural size from its children and then clamps the result so it never exceeds this value. Ignored for all other modes.
Declaration
public ScyllaUILength MaxSize
Field Value
| Type | Description |
|---|---|
| ScyllaUILength |
MinSize
Lower bound of the content-clamp range used when Mode is MinMax. The solver computes the track's natural size from its children and then clamps the result so it is never less than this value. Ignored for all other modes.
Declaration
public ScyllaUILength MinSize
Field Value
| Type | Description |
|---|---|
| ScyllaUILength |
Mode
The sizing mode that determines how this track is resolved by the grid solver. Only the fields relevant to the chosen mode are consulted; the others are ignored: Fixed uses FixedSize; Fractional uses FractionalWeight; Auto measures child content directly; MinMax uses MinSize and MaxSize.
Declaration
[Tooltip("How this track is sized: explicit (Fixed), fractional (fr), auto (hug content), or clamped (MinMax).")]
public ScyllaUITrackSizingMode Mode
Field Value
| Type | Description |
|---|---|
| ScyllaUITrackSizingMode |
Methods
Auto()
Creates a ScyllaUITrack with Auto
mode. The track sizes to the maximum preferred extent of the children assigned to
it on this axis, similar to CSS max-content.
Declaration
public static ScyllaUITrack Auto()
Returns
| Type | Description |
|---|---|
| ScyllaUITrack | A new ScyllaUITrack in Auto mode. |
Fixed(ScyllaUILength)
Creates a ScyllaUITrack with Fixed mode and the specified explicit size. The track always resolves to exactly this size regardless of available grid space.
Declaration
public static ScyllaUITrack Fixed(ScyllaUILength size)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaUILength | size | Explicit track size. May be absolute pixels or a percent of the grid's resolved dimension on the same axis. |
Returns
| Type | Description |
|---|---|
| ScyllaUITrack | A new ScyllaUITrack in Fixed mode. |
Fractional(float)
Creates a ScyllaUITrack with Fractional
mode and the specified proportional weight. After all fixed and auto tracks claim
their space, remaining space is split among fractional tracks in proportion to their
weights; a weight of 1 in a grid of two equal fractional tracks gives each
exactly half the remainder.
Declaration
public static ScyllaUITrack Fractional(float weight)
Parameters
| Type | Name | Description |
|---|---|---|
| float | weight | Non-negative fractional weight. Values below zero are clamped to zero by the factory. A weight of zero effectively removes the track from fractional distribution. |
Returns
| Type | Description |
|---|---|
| ScyllaUITrack | A new ScyllaUITrack in Fractional mode. |
MinMax(ScyllaUILength, ScyllaUILength)
Creates a ScyllaUITrack with MinMax
mode, clamped between an explicit minimum and maximum size. The solver first
computes the track's natural size from its content, then clamps the result to
[min, max].
Declaration
public static ScyllaUITrack MinMax(ScyllaUILength min, ScyllaUILength max)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaUILength | min | Lower bound on the resolved track size. |
| ScyllaUILength | max | Upper bound on the resolved track size. |
Returns
| Type | Description |
|---|---|
| ScyllaUITrack | A new ScyllaUITrack in MinMax mode. |