Skip to main content

Reactive Unity UI.
Built in C#.

A reactive UI library for Unity. Compose native uGUI components, bind them to typed state, and let Pine handle updates and cleanup.

One source.
A living interface.

Read state inside a binding. Change it from a callback. Pine tracks the relationship.

Build the counter →
App.cs
using Pine;
using UnityEngine;

public static class App
{
public static View Mount()
{
var count = P.Source(0);
return P.Vertical(
spacing: 12,
childControlWidth: true,
childControlHeight: true,
childForceExpandHeight: false,
sizeDelta: new Vector2(240, 160)
)
.With(
P.Text(() => $"Count: {count.Value}", fontSize: 24)
.With(P.LayoutElement(preferredHeight: 40)),
P.Button("Increment", onClick: () => count.Value++)
.With(P.LayoutElement(preferredHeight: 40)),
P.Button(
"Reset",
onClick: () => count.Value = 0,
interactable: new Value<bool>(() => count.Value > 0)
)
.With(P.LayoutElement(preferredHeight: 40))
);
}
}

Typed reactivity

Sources, derived values, effects, batching, and contexts. Explicit typed state and scoped bindings.

Native Unity UI

Compose uGUI and TextMeshPro components. Create the Canvas and input host from code.

Owned lifetimes

Scopes own bindings, callbacks, branches, and animations. One app entry owns the tree. Destroying its root ends the scope; scene lifetime is optional.

Build something with Pine

Build a reactive game HUDCreate dynamic Unity UI listsBind Unity UI to C# stateAnimate Unity UI with springs