API reference Loom UI
API reference

Loom UI

Add LoomUI to a startup scene and configure its loading cover and DevTools settings.

LoomUI is the single component you add to a startup-scene GameObject. On Awake it:

  1. Builds the LoomView and input capture used by the URP renderer and keeps one active UI session across scene loads.
  2. Initializes the Loom runtime.
  3. In the Editor: spawns the Vite dev server and navigates the WebView once it’s ready.
  4. In player builds: loads the static UI from Application.streamingAssetsPath/Loom/index.html.

Adding it to your scene

Run:

Tools > Loom > Setup UI in Current Scene

The command adds a Loom UI GameObject and installs LoomRendererFeature on every renderer used by the project’s URP quality assets. Running it again keeps the existing LoomUI and adds any missing renderer features.

If you add LoomUI manually, run the setup menu afterward. It detects the existing component and configures the URP renderers without adding another one.

Bridge access

Loom constructs your single [Bridge] root at startup. See The bridge model for its declaration rules.

The generator emits a static Instance property on your bridge class. Use it from gameplay code after Loom initializes:

C#
UIBridge.Instance.Score = 10;

Inspector fields

FieldNotes
Enable Dev ToolsEditor-only, on by default. Enables the WebView devtools server on 127.0.0.1:6080 so you can attach a browser inspector via Tools > Loom > Open Browser DevTools. Takes effect the first time the UI starts after you open the Unity Editor.
Show Loading CoverOn by default. Shows an opaque overlay over the scene during cold start, faded out when the first UI frame paints, so the bare scene isn’t visible while the UI loads.
Loading Cover ColorSolid color for the cover (default black). Alpha is ignored, the cover is always fully opaque while shown.
Loading Cover Fade SecondsFade-out duration after the first frame paints (default 0.2). 0 = disappear instantly.

Scene and player lifetime

LoomUI persists across scene loads. Use bridge state to change screens; see Scene loading for per-scene drivers. For building and testing a player, see Player builds.

Shutdown

LoomUI calls LoomRuntime.Shutdown() automatically when the component is destroyed (e.g. when the application quits). No manual teardown is needed. To also stop the Vite dev server mid-session, use Tools > Loom > Stop Dev Server.

Loom documentation

Search docs

Esc

Type a word or phrase to search the documentation.

Type a word or phrase to search the documentation.