Exact, flexible and content sizing
This reference documents every current public declaration in this part of Pine. Examples run inside App.Mount(), a component factory, or an explicit UI.Root(...) unless they only create state/configuration. Explicit UI.Mount(...) remains available for advanced ownership. Variable names such as count, items and label refer to the typed values described by each example. All APIs run on Unity’s main thread.
UI.Size
public static IProperty<Component> Size(Value<Vector2> size)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement. Rows and columns preserve this minimum and preferred size even when the parent is smaller; overflow remains visible until Clip or ScrollView is declared. Uniform grids reject conflicting exact dimensions. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Value<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Size(width: 360, height: 48));
public static IProperty<Component> Size(float width, float height)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement. Rows and columns preserve this minimum and preferred size even when the parent is smaller; overflow remains visible until Clip or ScrollView is declared. Uniform grids reject conflicting exact dimensions. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
width | Finite non-negative exact width in canvas units. |
height | Finite non-negative exact height in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Size(width: 360, height: 48));
public static IProperty<Component> Size(Func<Vector2> size)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement. Rows and columns preserve this minimum and preferred size even when the parent is smaller; overflow remains visible until Clip or ScrollView is declared. Uniform grids reject conflicting exact dimensions. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Func<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Size(width: 360, height: 48));
UI.Width
public static IProperty<Component> Width(Value<float> width)
Requests one exact non-negative finite axis in both native rect and layout sizing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
width | Finite non-negative exact width in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Width(width: 360f));
public static IProperty<Component> Width(Func<float> width)
Requests one exact non-negative finite axis in both native rect and layout sizing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
width | Finite non-negative exact width in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Width(width: 360f));
UI.Height
public static IProperty<Component> Height(Value<float> height)
Requests one exact non-negative finite axis in both native rect and layout sizing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
height | Finite non-negative exact height in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Height(height: 48f));
public static IProperty<Component> Height(Func<float> height)
Requests one exact non-negative finite axis in both native rect and layout sizing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
height | Finite non-negative exact height in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Height(height: 48f));
UI.Fill
public static IProperty<Component> Fill()
Explicitly fills available space on both axes, using layout flexibility under a layout group and stretching under a plain parent.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Fill());
UI.FillWidth
public static IProperty<Component> FillWidth()
Fills available width, using native layout flexibility or parent stretching.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.FillWidth());
UI.FillHeight
public static IProperty<Component> FillHeight()
Fills available height, using native layout flexibility or parent stretching.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.FillHeight());
UI.Auto
public static IProperty<Component> Auto()
Sizes both axes from native content preference rather than specifying exact dimensions.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Auto());
UI.AutoWidth
public static IProperty<Component> AutoWidth()
Sizes width from native content preference.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.AutoWidth());
UI.AutoHeight
public static IProperty<Component> AutoHeight()
Sizes height from native content preference.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.AutoHeight());
UI.PreferredSize
public static IProperty<Component> PreferredSize(Value<Vector2> size)
Sets native LayoutElement preferred dimensions without imposing exact minima. This is an advanced native layout operation; ordinary fixed declarations use Size. Fill and Auto express flexible and content-derived sizing explicitly. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Value<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.PreferredSize(width: 360, height: 48));
public static IProperty<Component> PreferredSize(float width, float height)
Sets native LayoutElement preferred dimensions without imposing exact minima. This is an advanced native layout operation; ordinary fixed declarations use Size. Fill and Auto express flexible and content-derived sizing explicitly. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
width | Finite non-negative exact width in canvas units. |
height | Finite non-negative exact height in canvas units. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.PreferredSize(width: 360, height: 48));
public static IProperty<Component> PreferredSize(Func<Vector2> size)
Sets native LayoutElement preferred dimensions without imposing exact minima. This is an advanced native layout operation; ordinary fixed declarations use Size. Fill and Auto express flexible and content-derived sizing explicitly. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Func<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.PreferredSize(width: 360, height: 48));
UI.Position
public static IProperty<Component> Position(Value<Vector2> position)
Binds RectTransform.anchoredPosition. A parent layout group can drive positions; use a plain frame for freely positioned children. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
position | Typed immediate position or reactive native position, as specified by this overload. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Image(UI.Position(x: 20, y: 30));
public static IProperty<Component> Position(float x, float y)
Binds RectTransform.anchoredPosition. A parent layout group can drive positions; use a plain frame for freely positioned children. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
x | The typed x input (float); literals and supported reactive adapters follow this overload's documented behavior. |
y | The typed y input (float); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Image(UI.Position(x: 20, y: 30));
public static IProperty<Component> Position(Func<Vector2> position)
Binds RectTransform.anchoredPosition. A parent layout group can drive positions; use a plain frame for freely positioned children. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
position | Typed immediate position or reactive native position, as specified by this overload. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Image(UI.Position(x: 20, y: 30));
UI.Anchors
public static IProperty<Component> Anchors(Value<Vector2> minimum, Value<Vector2> maximum)
Binds normalized minimum and maximum anchors. Size fixes its configured axes; Stretch/Fill and custom anchors explicitly control parent-relative geometry. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
minimum | Reactive finite lower bound; negative values are supported. |
maximum | Reactive finite upper bound, at least the lower bound. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(
UI.Anchors(
minimum: UnityEngine.Vector2.zero,
maximum: UnityEngine.Vector2.one
)
);
UI.Pivot
public static IProperty<Component> Pivot(Value<Vector2> pivot)
Binds the normalized native RectTransform pivot. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
pivot | The typed pivot input (Value<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Pivot(pivot: new UnityEngine.Vector2(x: 0, y: 1)));
public static IProperty<Component> Pivot(Func<Vector2> pivot)
Binds the normalized native RectTransform pivot. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
pivot | The typed pivot input (Func<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Pivot(pivot: new UnityEngine.Vector2(x: 0, y: 1)));
UI.Stretch
public static IProperty<Component> Stretch()
Sets anchors to zero/one and offsets to zero once. Parent-relative dimensions follow the parent rect.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Stretch());
UI.Clip
public static IProperty<Component> Clip(Value<bool> enabled)
Adds or reuses RectMask2D and binds its enabled state. Clipping is opt-in; the ordinary frame keeps overflow visible. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
enabled | The typed enabled input (Value<bool>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Clip(enabled: true));
public static IProperty<Component> Clip(Func<bool> enabled)
Adds or reuses RectMask2D and binds its enabled state. Clipping is opt-in; the ordinary frame keeps overflow visible. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
enabled | The typed enabled input (Func<bool>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.Clip(enabled: true));
UI.Padding
public static IProperty<RectTransform> Padding(Value<RectOffset> padding)
Binds native horizontal/vertical layout padding on a frame. It uses an existing compatible layout group, or adds a vertical group when absent. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
padding | The typed padding input (Value<RectOffset>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Column(
UI.Padding(
padding: new UnityEngine.RectOffset(
left: 12,
right: 12,
top: 8,
bottom: 8
)
)
);
public static IProperty<RectTransform> Padding(Func<RectOffset> padding)
Binds native horizontal/vertical layout padding on a frame. It uses an existing compatible layout group, or adds a vertical group when absent. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
padding | The typed padding input (Func<RectOffset>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Column(
UI.Padding(
padding: new UnityEngine.RectOffset(
left: 12,
right: 12,
top: 8,
bottom: 8
)
)
);
UI.Vertical
public static IProperty<RectTransform> Vertical()
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Column(UI.Vertical(12));
public static IProperty<RectTransform> Vertical(Value<float> spacing)
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Value<float>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Column(UI.Vertical(12));
public static IProperty<RectTransform> Vertical(Func<float> spacing)
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Func<float>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Column(UI.Vertical(12));
UI.Horizontal
public static IProperty<RectTransform> Horizontal()
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Row(UI.Horizontal(12));
public static IProperty<RectTransform> Horizontal(Value<float> spacing)
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Value<float>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Row(UI.Horizontal(12));
public static IProperty<RectTransform> Horizontal(Func<float> spacing)
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion. Spacing is reactive; no-argument spacing is eight units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Func<float>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Row(UI.Horizontal(12));
UI.Grid
public static GridLayoutGroup Grid(Value<Vector2> cellSize, Value<int> columns, params IProperty<GridLayoutGroup>[] properties)
Creates an owned native uniform GridLayoutGroup with reactive shared cell dimensions and column count. The native result allows grid-specific properties to reject plain frames at compilation. Columns must be positive, and conflicting exact child sizes report an error.
| Parameter | Meaning |
|---|---|
cellSize | Reactive non-negative finite shared grid cell dimensions. |
columns | Reactive positive native grid column count. |
properties | Compatible typed declarations to apply; incompatible component/property combinations are rejected at compilation. |
Returns: The live native component, owned by the active scope. Retain it for direct native access or typed UI.Apply; reactive bindings update this same instance.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.Children(UI.Image(), UI.Image())
);
UI.CellSize
public static IProperty<GridLayoutGroup> CellSize(Value<Vector2> size)
Binds uniform grid dimensions shared by every cell. Dimensions must be finite and non-negative; children with a contradictory exact Size are rejected rather than silently overridden. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Value<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.CellSize(size: cellSize)
);
public static IProperty<GridLayoutGroup> CellSize(Func<Vector2> size)
Binds uniform grid dimensions shared by every cell. Dimensions must be finite and non-negative; children with a contradictory exact Size are rejected rather than silently overridden. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
size | The typed size input (Func<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.CellSize(size: cellSize)
);
UI.GridSpacing
public static IProperty<GridLayoutGroup> GridSpacing(Value<Vector2> spacing)
Binds horizontal and vertical native grid spacing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Value<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.GridSpacing(spacing: new UnityEngine.Vector2(x: 4, y: 4))
);
public static IProperty<GridLayoutGroup> GridSpacing(Func<Vector2> spacing)
Binds horizontal and vertical native grid spacing. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
spacing | The typed spacing input (Func<Vector2>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.GridSpacing(spacing: new UnityEngine.Vector2(x: 4, y: 4))
);
UI.GridPadding
public static IProperty<GridLayoutGroup> GridPadding(Value<RectOffset> padding)
Binds native uniform-grid padding. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
padding | The typed padding input (Value<RectOffset>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Grid(
cellSize: new UnityEngine.Vector2(x: 48, y: 48),
columns: 4,
UI.GridPadding(
padding: new UnityEngine.RectOffset(
left: 8,
right: 8,
top: 8,
bottom: 8
)
)
);
UI.SafeArea
public static IProperty<Component> SafeArea(Value<bool> enabled)
Adds or reuses an allocation-free native safe-area follower, with reactive enablement. It refreshes anchors when the screen dimensions or safe area change; mount defaults apply this to non-world canvases. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
enabled | The typed enabled input (Value<bool>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.SafeArea(enabled: true), UI.Children(UI.Label(text: "Safe")));
public static IProperty<Component> SafeArea(Func<bool> enabled)
Adds or reuses an allocation-free native safe-area follower, with reactive enablement. It refreshes anchors when the screen dimensions or safe area change; mount defaults apply this to non-world canvases. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.
| Parameter | Meaning |
|---|---|
enabled | The typed enabled input (Func<bool>); literals and supported reactive adapters follow this overload's documented behavior. |
Returns: A compatible property operation to apply within a live ownership scope.
Ownership: Construct and apply declarations on Unity's main thread within UI.Mount, UI.Root or a live Scope.Run. Literal assignments occur once; reactive observers and handlers end with their owning scope.
UI.Frame(UI.SafeArea(enabled: true), UI.Children(UI.Label(text: "Safe")));
