[Bridge]
public partial class SampleBridge : LoomBridgeBase {
public float Health { get; set; } = 100f;
[BridgeAction]
public void TakeDamage(float amount) {
Health = Mathf.Max(0f, Health - amount);
Damaged.Fire(new DamageEvent { Amount = amount });
}
public Event<DamageEvent> Damaged { get; } = new();
}LOOM IS HERE.
The final UI framework for Unity games.
Full HTML, CSS and JS support, just like your browser.
Sample UI copy-pasted from a game we are working on.
The Bridge.
Tag a C# class with [Bridge] and a source generator emits the
matching TypeScript. Your UI imports those types with full autocomplete.
Rename a property on the C# side and the TS compiler tells you, in detail,
what to change. Pass complex objects, fire events, await async actions.
It just works.
It's the kind of thing you'd build in-house at a 200-person studio, except now you don't.
import { useBridge, onEvent } from '@loomgui/bridge'
export default function Hud() {
const bridge = useBridge()
onEvent('damaged', flashRed)
return (
<HealthBar value={bridge.health} />
)
}An aside: we tried doing this with raw JSON first. It worked for a weekend. Then we hit a generic. Then a nullable. Then a polymorphic struct. So we wrote a source generator.
The Engine.
Loom doesn't reimplement a browser. It hosts a Rust browser engine and paints its output straight into your Unity render pipeline with zero copies on macOS Apple Silicon through Metal and Windows x86-64 through Direct3D 11 or Direct3D 12.
Real flexbox, real grid, real CSS transitions and transforms, and a real DOM you can inspect with Firefox DevTools. The browser engine you already know, piping frames into Unity.
Hot Reload.
Vite runs alongside the Unity Editor. Save a file in your UI app and the change shows up in Play mode without a domain reload. Edit a CSS variable and it lands in the next frame. The whole loop takes under a second; a Unity domain reload would take forever.
The Tools.
Tools > Loom sets up the UI project and current scene, syncs the bundled UI dependencies, controls the dev server, builds the UI for a player, regenerates bridge types, and opens Firefox DevTools. Doctor audits the development environment: Node, npm, Vite reachability, platform plug-in presence, and bridge-type freshness.
You'll find out what's wrong before the wrong finds you.
And So Much More.
The long tail of things we built because we ran into them:
- Zero-copy macOS IOSurface + Metal pipeline
- Zero-copy Windows Direct3D 11 and 12 GPU paths
- DPI auto-detection per-monitor scale factor
- Async paint triple-buffered surface rotation
- Frame pacing tied to Unity's render loop
- Generated bridge data typed state, actions and events
- Reactive signals Solid-side, replayed from C#
- Guided project setup UI project + dependency sync
- Action dispatch main-thread, async return values
- Bridge enums by name refactor-safe
- State replay late-mounting pages see prior state
- Persistent UI session survives scene transitions
- Full pointer + key events hover, capture, focus, DOM codes
- Source generator convention-based bridge, no boilerplate
- Doctor menu audits dev environment
- Orphan Vite reclaim cleans up across Unity sessions
- Browser DevTools attach Firefox to Loom's engine
- ABI versioning mismatch-fails-fast checks
- Browser mock mode develop UI without Play mode
- and a lot more buried in the changelog
Yeah this took a while to implement...
Questions?
- Can I build my Unity game's UI with HTML and CSS?
- Yes. Loom renders your UI from real HTML, CSS and TypeScript and paints it straight into Unity's render pipeline. You build the interface the way you'd build a web app, and it runs inside the game.
- How is Loom different from Unity's UI Toolkit?
- UI Toolkit's UXML and USS resemble HTML and CSS but are a Unity-specific subset. Loom runs the actual web stack — full CSS, the npm ecosystem and your choice of UI framework. Loom vs UI Toolkit →
- Is web-based UI fast enough for a game?
- Plenty. Loom renders on the GPU and hands finished frames to Unity with zero copies. The UI ends up as a texture in the pipeline Unity already draws every frame.
- Which engines and platforms does Loom support?
- Loom 1.0 supports Solid.js UI in Unity 6000.3.0f1 or newer with URP 17.3.0 or newer: Windows x86-64 using Direct3D 11 or 12, and macOS Apple Silicon using Metal.
- Do I need to know Rust or C++ to use Loom?
- No. You build the UI in HTML, CSS and TypeScript and connect it to your game through C#. The engine that renders it is handled for you.
- How is Loom licensed?
- The Unity Asset Store edition is a perpetual single-seat license with all same-SKU updates included. Studios can request a separate 12-month team license with support included. See licensing options →
Bring the web stack
to your Unity UI.
Choose a perpetual single-seat license through the Unity Asset Store, or request a 12-month Studio license with support for your team.