[Bridge]
public partial class SampleBridge {
[BridgeState]
public float Health { get; set; } = 100f;
[BridgeAction]
public void TakeDamage(float amount) {
Health = Mathf.Max(0f, Health - amount);
Damaged.Fire(new DamageEvent { Amount = amount });
}
[BridgeEvent]
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.state.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 and Windows — Metal, DX11 and DX12.
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.
The Loom menu adds a small set of tools to the Unity Editor. One menu
creates the base UI project and runs npm install. One menu rebuilds
the native plugin. One menu opens Firefox DevTools against the engine.
And a Doctor menu that audits the whole dev
environment: node, npm, Vite reachability, native plugin presence,
bridge types 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 D3D11 keyed-mutex (D3D12 fallback)
- DPI auto-detection per-monitor scale factor
- Async paint triple-buffered surface rotation
- Frame pacing tied to Unity's render loop
- MessagePack codec reflection-based DTO encoding
- Reactive signals Solid-side, replayed from C#
- One-menu install tarball + npm sync in a click
- Action dispatch main-thread, async return values
- Bridge enums by name refactor-safe
- State replay late-mounting pages see prior state
- DontDestroyOnLoad canvas UI survives scene transitions
- Full pointer + key events hover, capture, focus, DOM codes
- Source generator [BridgeAction] without 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
- Engine-neutral protocol Unreal & Godot adapters next
- 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?
- Unity 6.x on Windows, macOS today. Linux support and adapters for Godot and Unreal Engine are in the works.
- 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?
- Loom is a paid product with a perpetual license — you keep the version you buy, and updates are included for 12 months. It is free during the beta; pricing will be announced when purchasing opens. Get early access →
Try Loom for free.
Drop it in and play.
Drop the tarball into your Unity project's Packages/, point
your manifest at it, and run one menu item. Pricing announced when we
open up for purchase.