Skip to main content

Native declarations and bindings

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.

IProperty​

IProperty<in T>

A contravariant declaration operation restricted to compatible native component types. Text properties accept TMP text; control properties accept their corresponding controls. Invalid property/component combinations fail compilation. Implement this interface for typed custom properties; Apply runs in the caller's active ownership scope.

Type parameterMeaning
TTyped value, native result or identity contract; see the summary for its role.
IProperty<TMPro.TMP_Text> text = UI.Text(text: "Hello");
UI.Label(text: "Initial", text);

IProperty.Apply​

void Apply(T target)

Applies this compatible property to the supplied native target in the current ownership scope. Custom implementations may create owned reactive bindings via UI.Effect and UI.Cleanup.

ParameterMeaning
targetThe existing native component or tracked target getter, as specified by this overload.

Returns: The typed result described above; reactive reads participate in the active observer.

UI.Apply(target: label, UI.Text(text: "Applied"));

GraphicProperty​

GraphicProperty

A color binding shared by native Graphics and Selectables. On a Selectable it configures targetGraphic rather than requiring the control itself to inherit Graphic. The factory uses this intersection contract to keep Tint available on text, images and controls while rejecting plain frames.

UI.Button(
text: "Save",
click: () => { },
UI.Tint(color: UnityEngine.Color.green)
);

GraphicProperty.Identity​

string Identity

The named native operation used by strict duplicate diagnostics. Obtain instances from UI.Tint; the operation is shared across graphic and selectable targets.

var tint = UI.Tint(color: UnityEngine.Color.white);
string name = tint.Identity;

Mount​

Mount

An explicit mounted interface lifetime. Scope owns bindings and created native objects; Root identifies the returned interface and Canvas identifies its containing canvas. Dispose removes the interface; destroying Root also disposes its scope. Pine-owned canvases persist by default; CanvasOptions.Persistent=false selects scene lifetime. The result is optional; retain it for early disposal. Destroying Root ends its scope.

Mount mount = UI.Mount(component: () => UI.Label(text: "Hello"));
mount.Dispose();

Mount.Scope​

Scope Scope

The scope owning this mounted interface, including bindings and native objects. Enter it with Run to apply further declarations after construction.

mount.Scope.Run(() => UI.Apply(target: label, UI.Text(text: "Updated")));

Mount.Root​

GameObject Root

The native root returned by the mount builder. Destroying it also ends the mount scope; disposal destroys owned roots.

UnityEngine.GameObject root = mount.Root;

Mount.Canvas​

Canvas Canvas

The Pine-created canvas or nearest ancestor canvas of an explicit parent. Existing external canvases remain externally owned.

UnityEngine.Canvas canvas = mount.Canvas;

Mount.Dispose​

public void Dispose()

Ends this owned lifetime idempotently. Dependencies and native event/clock registrations are released; Scope/Mount cleanup attempts all resources and aggregates failures. Explicit owners may dispose their mount early; automatic applications end when their root is destroyed.

mount.Dispose();

UI.Cleanup​

public static void Cleanup(UnityEngine.Object target)

Registers a callback, disposable or Unity object with the active scope. Cleanup occurs in reverse registration order when the scope ends or an effect reruns. Unity objects are destroyed at the end of the frame in Play Mode and immediately in Edit Mode; callback failures do not skip other resources.

ParameterMeaning
targetThe existing native component or tracked target getter, as specified by this overload.

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.Cleanup(cleanup: () => UnityEngine.Debug.Log("Interface removed"));

UI.Create​

public static T Create<T>(params IProperty<T>[] properties) where T : Component

Creates and owns a GameObject, RectTransform and the native component T, then applies compatible typed properties. Creation requires a scope. Defaults configure text and controls unless disabled. The native result can be saved, configured directly or passed into Children.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
propertiesCompatible 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.

var label = UI.Create<TMPro.TextMeshProUGUI>(
UI.Text(text: "Created"),
UI.Size(width: 240, height: 48)
);

UI.Clone​

public static T Clone<T>(T template, params IProperty<T>[] properties) where T : Component

Owns a native clone of the supplied component's GameObject, preserves its serialized native configuration, and applies compatible properties. Existing template bindings are not copied: declare new reactive bindings for the clone. The template itself remains externally owned.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
templateThe typed template input (T); literals and supported reactive adapters follow this overload's documented behavior.
propertiesCompatible 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.

var copy = UI.Clone(template: label, UI.Text(text: "Copy"));

UI.Apply​

public static T Apply<T>(T target, params IProperty<T>[] properties) where T : Component

Applies compatible declarations to an existing native component in the active scope. New bindings and handlers belong to that scope; the component remains externally owned unless Pine created it or cleanup explicitly owns it. Applying later requires entering the original live scope.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
targetThe existing native component or tracked target getter, as specified by this overload.
propertiesCompatible typed declarations to apply; incompatible component/property combinations are rejected at compilation.

Returns: The same supplied native component. Its external ownership is preserved; only bindings and resources added by these declarations belong to the active 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.Apply(target: label, UI.Text(text: () => count.Value.ToString()));

UI.Group​

public static IProperty<T> Group<T>(params IProperty<T>[] properties) where T : Component

Composes reusable properties for one explicit native target type. Contravariance allows a group targeting a base component to configure compatible derived components. Nested group processing follows DeferNestedProperties; strict duplicate diagnostics apply within each declaration group.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
propertiesCompatible typed declarations to apply; incompatible component/property combinations are rejected at compilation.

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.

var textStyle = UI.Group<TMPro.TMP_Text>(
UI.FontSize(size: 24),
UI.Text(text: "Styled")
);
UI.Label(text: "Initial", textStyle);

UI.Action​

public static IProperty<T> Action<T>(Action<T> action, int priority = 1) where T : Component

Runs a one-time typed action before ordinary properties and parenting. Lower numeric priorities run first; equal priorities retain declaration order. Use Configure for the ordinary-property phase. The action runs within construction ownership and context.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
actionCallback/action executed in the documented phase or event scope.
priorityOrdering before ordinary assignments: lower runs first, equal values retain declaration order.

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.Action<UnityEngine.RectTransform>(
action: frame => frame.name = "Action",
priority: 0
)
);

UI.Configure​

public static IProperty<T> Configure<T>(Action<T> configure) where T : Component

Runs a one-time typed native configuration in the ordinary-property phase. T is the actual compatible target, so configuring another component type is rejected at compilation. Use Set or Bind when the native assignment must remain reactive.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
configureOne-time typed native configuration, performed in the ordinary-property phase.

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.Label(
text: "Centered",
UI.Configure<TMPro.TextMeshProUGUI>(configure: label =>
label.alignment = TMPro.TextAlignmentOptions.Center
)
);

UI.Set​

public static IProperty<T> Set<T, TValue>(string name, Action<T, TValue> set, Value<TValue> value) where T : Component

Declares a named typed native assignment. Literals assign once; reactive values/getters install an owned effect. Getter dependencies are tracked, but the setter is untracked so native work cannot add accidental dependencies. Names identify duplicates within strict groups and must be nonempty.

Type parameterMeaning
TNative component target compatible with these declarations.
TValueTyped value, native result or identity contract; see the summary for its role.
ParameterMeaning
nameNative name or nonempty property identity used by strict diagnostics.
setTyped native setter run without dependency tracking.
valueThe typed value or reactive input to read/apply; sources remain observable for the owning lifetime.

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.Label(
text: "Value",
UI.Set<TMPro.TMP_Text, float>(
name: "Spacing",
set: (label, value) => label.characterSpacing = value,
value: 2f
)
);
public static IProperty<T> Set<T, TValue>(string name, Action<T, TValue> set, Func<TValue> read) where T : Component

Declares a named typed native assignment. Literals assign once; reactive values/getters install an owned effect. Getter dependencies are tracked, but the setter is untracked so native work cannot add accidental dependencies. Names identify duplicates within strict groups and must be nonempty.

Type parameterMeaning
TNative component target compatible with these declarations.
TValueTyped value, native result or identity contract; see the summary for its role.
ParameterMeaning
nameNative name or nonempty property identity used by strict diagnostics.
setTyped native setter run without dependency tracking.
readThe getter whose source reads establish reactive dependencies; supply a stable native result where required.

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.Label(
text: "Value",
UI.Set<TMPro.TMP_Text, float>(
name: "Spacing",
set: (label, value) => label.characterSpacing = value,
value: 2f
)
);

UI.Bind​

public static T Bind<T, TValue>(this T component, Func<TValue> read, Action<T, TValue> apply) where T : Component

Adds an owned reactive getter/setter binding to a saved native component and returns the same component. Reads collect dependencies; native assignment runs untracked. Call during construction or from a live Scope.Run; ending that scope stops updates without destroying an external component.

Type parameterMeaning
TTyped value, native result or identity contract; see the summary for its role.
TValueTyped value, native result or identity contract; see the summary for its role.
ParameterMeaning
componentBuilder returning the live native root in the mount scope.
readThe getter whose source reads establish reactive dependencies; supply a stable native result where required.
applyThe typed apply input (Action<T, TValue>); literals and supported reactive adapters follow this overload's documented behavior.

Returns: The typed result described above; reactive reads participate in the active observer.

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.

label.Bind(
() => count.Value.ToString(),
(target, value) => target.text = value
);

UI.Name​

public static IProperty<Component> Name(Value<string> name)

Binds the native GameObject name. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
nameNative name or nonempty property identity used by strict diagnostics.

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.Name(name: "Panel"));
public static IProperty<Component> Name(Func<string> name)

Binds the native GameObject name. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
nameNative name or nonempty property identity used by strict diagnostics.

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.Name(name: "Panel"));

UI.Active​

public static IProperty<Component> Active(Value<bool> active)

Binds GameObject activeSelf; disabling a native object does not dispose its construction scope. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
activeThe typed active 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.Active(active: () => visible.Value));
public static IProperty<Component> Active(Func<bool> active)

Binds GameObject activeSelf; disabling a native object does not dispose its construction scope. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
activeThe typed active 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.Active(active: () => visible.Value));

UI.Parent​

public static IProperty<Component> Parent(Value<Transform> parent)

Binds the native parent Transform while preserving local UI transforms. Parenting runs after ordinary property application, validates uniform grid conflicts, and does not take ownership of an external parent. Sources/getters can reparent an existing native result without rebuilding it.

ParameterMeaning
parentOptional external native parent; null creates a Pine-owned canvas.

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.Parent(parent: canvas.transform));
public static IProperty<Component> Parent(Func<Transform> parent)

Binds the native parent Transform while preserving local UI transforms. Parenting runs after ordinary property application, validates uniform grid conflicts, and does not take ownership of an external parent. Sources/getters can reparent an existing native result without rebuilding it.

ParameterMeaning
parentOptional external native parent; null creates a Pine-owned canvas.

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.Parent(parent: canvas.transform));

UI.Children​

public static IProperty<Component> Children(params Component[] children)

Composes native child components explicitly. Fixed children attach once; getter children reconcile retained instances and sibling order as tracked inputs change. Removed external children detach; creation scopes own destruction. Duplicate native transforms are rejected in strict mode. Parenting preserves local UI transforms.

ParameterMeaning
childrenFixed native children or tracked getter of retained child instances; duplicates are rejected in strict mode.

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.Children(UI.Label(text: "One"), UI.Label(text: "Two")));
public static IProperty<Component> Children(Func<IEnumerable<Component>> read)

Composes native child components explicitly. Fixed children attach once; getter children reconcile retained instances and sibling order as tracked inputs change. Removed external children detach; creation scopes own destruction. Duplicate native transforms are rejected in strict mode. Parenting preserves local UI transforms.

ParameterMeaning
readThe getter whose source reads establish reactive dependencies; supply a stable native result where required.

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.Children(UI.Label(text: "One"), UI.Label(text: "Two")));
public static IProperty<Component> Children(Func<IEnumerable<GameObject>> read)

Composes native child components explicitly. Fixed children attach once; getter children reconcile retained instances and sibling order as tracked inputs change. Removed external children detach; creation scopes own destruction. Duplicate native transforms are rejected in strict mode. Parenting preserves local UI transforms.

ParameterMeaning
readThe getter whose source reads establish reactive dependencies; supply a stable native result where required.

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.Children(UI.Label(text: "One"), UI.Label(text: "Two")));

UI.On​

public static IProperty<T> On<T>(Func<T, UnityEvent> select, Action action) where T : Component

Registers a native UnityEvent handler for the compatible target type and removes it when the scope ends. Callbacks enter their captured construction scope and context, then batch source writes without dependency tracking. Use the generic value overload for native event payloads.

Type parameterMeaning
TNative component target compatible with these declarations.
ParameterMeaning
selectNative event selector or reactive branch selector, as specified by this overload.
actionCallback/action executed in the documented phase or event 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.Button(
text: "Save",
click: () => { },
UI.On<UnityEngine.UI.Button>(
select: b => b.onClick,
action: () => UnityEngine.Debug.Log("Clicked")
)
);
public static IProperty<T> On<T, TValue>(Func<T, UnityEvent<TValue>> select, Action<TValue> action) where T : Component

Registers a native UnityEvent handler for the compatible target type and removes it when the scope ends. Callbacks enter their captured construction scope and context, then batch source writes without dependency tracking. Use the generic value overload for native event payloads.

Type parameterMeaning
TNative component target compatible with these declarations.
TValueTyped value, native result or identity contract; see the summary for its role.
ParameterMeaning
selectNative event selector or reactive branch selector, as specified by this overload.
actionCallback/action executed in the documented phase or event 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.Button(
text: "Save",
click: () => { },
UI.On<UnityEngine.UI.Button>(
select: b => b.onClick,
action: () => UnityEngine.Debug.Log("Clicked")
)
);

UI.OnClick​

public static IProperty<Button> OnClick(Action action)

Registers an owned Button click handler. The callback batches writes, retains construction scope/context and is detached on cleanup. The native Button supplies mouse, touch and navigation-submit behavior through the compatible EventSystem.

ParameterMeaning
actionCallback/action executed in the documented phase or event 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.Button(text: "Save", click: () => UnityEngine.Debug.Log("Saved"));

UI.Changed​

public static IProperty<T> Changed<T, TValue>(Func<T, TValue> read, Action<TValue> changed, Func<T, UnityEvent<TValue>> events = null, IEqualityComparer<TValue> comparer = null) where T : Component

Observes a native value, calls the callback initially, and reports distinct changes under the supplied comparer. A supplied UnityEvent delivers changes directly; otherwise the shared clock polls the native getter. Cleanup removes the handler or polling listener. Callbacks retain their construction scope/context.

Type parameterMeaning
TNative component target compatible with these declarations.
TValueTyped value, native result or identity contract; see the summary for its role.
ParameterMeaning
readThe getter whose source reads establish reactive dependencies; supply a stable native result where required.
changedCallback for the initial native value and subsequent distinct values.
eventsOptional native event source; null uses shared-clock polling.
comparerOptional equality/identity comparer; null selects the documented default policy.

Returns: An owned subscription that invokes the callback for the initial native value and subsequent distinct values.

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.Create<UnityEngine.UI.Toggle>(
UI.Changed<UnityEngine.UI.Toggle, bool>(
read: t => t.isOn,
changed: value => UnityEngine.Debug.Log(value),
events: t => t.onValueChanged
)
);

UI.ToggleValue​

public static IProperty<Toggle> ToggleValue(Source<bool> source)

Installs a two-way binding between Source<bool> and native Toggle.isOn. Source updates use SetIsOnWithoutNotify to prevent event feedback; user-generated native changes write the source. Prefer UI.Toggle(source, ...) for a completely wired control.

ParameterMeaning
sourceMutable typed source used by this two-way native binding.

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.Toggle(value: isEnabled, text: "Enabled");

UI.SliderValue​

public static IProperty<Slider> SliderValue(Source<float> source)

Installs a two-way slider binding and normalizes the source to the native slider's clamped/rounded value. Source updates avoid synthetic value-change events; native changes update the source. Prefer UI.Slider(source, ...) for built-in graphics and handles.

ParameterMeaning
sourceMutable typed source used by this two-way native binding.

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.Slider(value: volume, minimum: 0f, maximum: 1f);

UI.InputValue​

public static IProperty<TMP_InputField> InputValue(Source<string> source)

Installs a two-way binding between a string source and TMP_InputField.text. Source writes use the native non-notifying setter; user edits write the source. Prefer UI.TextField(source, ...) for the complete viewport, text and placeholder hierarchy.

ParameterMeaning
sourceMutable typed source used by this two-way native binding.

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.TextField(value: playerName, placeholder: "Player name");

UI.Text​

public static IProperty<TMP_Text> Text(Value<string> text)

Binds TMP text while retaining the existing text component. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
textThe typed text input (Value<string>); 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.Label(text: "Initial", UI.Text(text: () => count.Value.ToString()));
public static IProperty<TMP_Text> Text(Func<string> text)

Binds TMP text while retaining the existing text component. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
textThe typed text input (Func<string>); 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.Label(text: "Initial", UI.Text(text: () => count.Value.ToString()));

UI.FontSize​

public static IProperty<TMP_Text> FontSize(Value<float> size)

Binds TMP font size in canvas units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
sizeThe typed size 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.Label(text: "Heading", UI.FontSize(size: 32));
public static IProperty<TMP_Text> FontSize(Func<float> size)

Binds TMP font size in canvas units. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
sizeThe typed size 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.Label(text: "Heading", UI.FontSize(size: 32));

UI.Font​

public static IProperty<TMP_Text> Font(Value<TMP_FontAsset> font)

Binds a code-supplied TMP font asset; null resolves the Pine default/fallback. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
fontThe typed font input (Value<TMP_FontAsset>); 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.Label(text: "Localized", UI.Font(font: fontAsset));
public static IProperty<TMP_Text> Font(Func<TMP_FontAsset> font)

Binds a code-supplied TMP font asset; null resolves the Pine default/fallback. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
fontThe typed font input (Func<TMP_FontAsset>); 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.Label(text: "Localized", UI.Font(font: fontAsset));

UI.Tint​

public static GraphicProperty Tint(Value<Color> color)

Binds Graphic.color or a Selectable targetGraphic color through a compile-safe shared property. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
colorThe typed color input (Value<Color>); 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.Tint(color: UnityEngine.Color.green));
public static GraphicProperty Tint(Func<Color> color)

Binds Graphic.color or a Selectable targetGraphic color through a compile-safe shared property. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
colorThe typed color input (Func<Color>); 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.Tint(color: UnityEngine.Color.green));

UI.Enabled​

public static IProperty<Selectable> Enabled(Value<bool> enabled)

Binds Selectable.interactable; disabled controls retain their native objects and bindings. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
enabledThe 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.Button(
text: "Save",
click: () => { },
UI.Enabled(enabled: () => canSave.Value)
);
public static IProperty<Selectable> Enabled(Func<bool> enabled)

Binds Selectable.interactable; disabled controls retain their native objects and bindings. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
enabledThe 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.Button(
text: "Save",
click: () => { },
UI.Enabled(enabled: () => canSave.Value)
);

UI.Navigation​

public static IProperty<Selectable> Navigation(Value<Navigation> navigation)

Binds the native Selectable navigation configuration, including explicit directional links. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
navigationThe typed navigation input (Value<Navigation>); 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.Button(
text: "Next",
click: () => { },
UI.Navigation(
navigation: new UnityEngine.UI.Navigation
{
mode = UnityEngine.UI.Navigation.Mode.Automatic,
}
)
);
public static IProperty<Selectable> Navigation(Func<Navigation> navigation)

Binds the native Selectable navigation configuration, including explicit directional links. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
navigationThe typed navigation input (Func<Navigation>); 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.Button(
text: "Next",
click: () => { },
UI.Navigation(
navigation: new UnityEngine.UI.Navigation
{
mode = UnityEngine.UI.Navigation.Mode.Automatic,
}
)
);

UI.Focus​

public static IProperty<Selectable> Focus()

Selects the native control through the active EventSystem; native navigation maintains visible focus states.

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.Button(text: "Start", click: () => { }, UI.Focus());

UI.Opacity​

public static IProperty<Component> Opacity(Value<float> opacity)

Adds or reuses CanvasGroup and binds alpha clamped to the range zero through one. It does not disable interaction or destroy children. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
opacityThe typed opacity 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.Frame(UI.Opacity(opacity: 0.5f));
public static IProperty<Component> Opacity(Func<float> opacity)

Adds or reuses CanvasGroup and binds alpha clamped to the range zero through one. It does not disable interaction or destroy children. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
opacityThe typed opacity 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.Frame(UI.Opacity(opacity: 0.5f));

UI.Frame​

public static RectTransform Frame(params IProperty<RectTransform>[] properties)

Creates an owned plain RectTransform for child composition and positioning. Overflow remains visible unless explicitly clipped.

ParameterMeaning
propertiesCompatible 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.Frame(
UI.Size(width: 300, height: 100),
UI.Children(UI.Label(text: "Panel"))
);

UI.Column​

public static RectTransform Column(params IProperty<RectTransform>[] properties)

Creates an owned frame with native vertical layout and an eight-unit default gap. Use Size, Fill and Auto to state sizing intent; children compose explicitly.

ParameterMeaning
propertiesCompatible 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.Column(
UI.Vertical(12),
UI.Children(UI.Label(text: "First"), UI.Label(text: "Second"))
);
public static RectTransform Column(float gap, params Component[] children)

Creates an owned vertical container with the supplied fixed gap and ordered native children. Children may be returned by ordinary custom component functions; they inherit the current mount or dynamic branch scope. Each factory runs once when its instance is constructed. Use the property overload for reactive spacing, sizing or dynamic child lists.

ParameterMeaning
gapFixed spacing between children in canvas units; negative spacing overlaps adjacent children.
childrenNative child components, including results of nested custom component factories, in display order.

Returns: The live native RectTransform, owned by the current scope. No additional mount is created.

Ownership: Call inside UI.Mount, a dynamic branch builder or a live Scope.Run. Hiding keeps the instance; removing a Pine-owned branch ends its bindings. Supply state from outside a removable branch to preserve it across reconstruction.

UI.Mount(component: () =>
{
var count = UI.Source(value: 0);
return UI.Column(
gap: 12,
UI.Label(text: () => $"Count: {count.Value}"),
UI.Button(text: "Increment", click: () => count.Value++)
);
});

UI.Row​

public static RectTransform Row(params IProperty<RectTransform>[] properties)

Creates an owned frame with native horizontal layout and an eight-unit default gap. Child exact sizes are preserved; flexible and content-driven sizing are explicit.

ParameterMeaning
propertiesCompatible 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.Row(
UI.Horizontal(12),
UI.Children(UI.Label(text: "Left"), UI.Label(text: "Right"))
);
public static RectTransform Row(float gap, params Component[] children)

Creates an owned horizontal container with the supplied fixed gap and ordered native children. Custom component functions compose synchronously under the enclosing ownership scope without additional mounts. Use the property overload for reactive spacing, sizing or dynamic child lists.

ParameterMeaning
gapFixed spacing between children in canvas units; negative spacing overlaps adjacent children.
childrenNative child components, including results of nested custom component factories, in display order.

Returns: The live native RectTransform, owned by the current scope. No additional mount is created.

Ownership: Call inside UI.Mount, a dynamic branch builder or a live Scope.Run. Retained children update through their bindings; ordinary state changes do not rebuild the complete factory.

UI.Row(
gap: 8,
UI.Button(text: "Save", click: () => Save()),
UI.Button(text: "Cancel", click: () => Cancel())
);

UI.Label​

public static TextMeshProUGUI Label(Value<string> text, params IProperty<TextMeshProUGUI>[] properties)

Creates owned TextMeshProUGUI with typed literal or reactive text, bundled/default font, white text and nonblocking raycasts. Compatible text, graphic and common properties are accepted at compilation.

ParameterMeaning
textThe typed text input (Value<string>); literals and supported reactive adapters follow this overload's documented behavior.
propertiesCompatible 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.Label(
text: () => count.Value.ToString(),
UI.FontSize(size: 24),
UI.Size(width: 240, height: 48)
);
public static TextMeshProUGUI Label(Func<string> text, params IProperty<TextMeshProUGUI>[] properties)

Creates owned TextMeshProUGUI with typed literal or reactive text, bundled/default font, white text and nonblocking raycasts. Compatible text, graphic and common properties are accepted at compilation.

ParameterMeaning
textThe typed text input (Func<string>); literals and supported reactive adapters follow this overload's documented behavior.
propertiesCompatible 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.Label(
text: () => count.Value.ToString(),
UI.FontSize(size: 24),
UI.Size(width: 240, height: 48)
);

UI.Image​

public static Image Image(params IProperty<Image>[] properties)

Creates an owned native Image with nonblocking decorative raycasts and typed sprite/color properties. Use Progress for a native filled image.

ParameterMeaning
propertiesCompatible 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.Image(UI.Sprite(sprite: icon), UI.Size(width: 48, height: 48));

UI.RawImage​

public static RawImage RawImage(params IProperty<RawImage>[] properties)

Creates an owned native RawImage with typed texture/color properties. Supply a code-configured Texture or RenderTexture without Inspector wiring.

ParameterMeaning
propertiesCompatible 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.RawImage(UI.Texture(texture: texture), UI.Size(width: 320, height: 180));

UI.Sprite​

public static IProperty<Image> Sprite(Value<Sprite> sprite)

Binds the sprite of a native Image. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
spriteThe typed sprite input (Value<Sprite>); 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.Sprite(sprite: icon));
public static IProperty<Image> Sprite(Func<Sprite> sprite)

Binds the sprite of a native Image. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
spriteThe typed sprite input (Func<Sprite>); 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.Sprite(sprite: icon));

UI.Texture​

public static IProperty<RawImage> Texture(Value<Texture> texture)

Binds the texture of a native RawImage. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
textureThe typed texture input (Value<Texture>); 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.RawImage(UI.Texture(texture: texture));
public static IProperty<RawImage> Texture(Func<Texture> texture)

Binds the texture of a native RawImage. Literal values apply once; typed reactive values and Value-wrapped getters stay bound for the active ownership scope.

ParameterMeaning
textureThe typed texture input (Func<Texture>); 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.RawImage(UI.Texture(texture: texture));