Tutorial 2: WebUIStudio
WebUIStudio is the desktop tool supplied with the plugin. It does not start the game. It loads the web source or build output from your project and lets you look at an interface page by page and state by state, inspect its controls, annotate changes on the interface itself and hand them to Codex or Claude. It is an authoring tool only and is not part of a packaged game.
On this page
Related: Tutorial 1: Build an interface with AI, Tutorial 4: Write the interface by hand.
Start
Download the dependencies before the first use. Click the WebUIStudio button on the Level Editor toolbar; when a dependency is missing or does not match the plugin version, the OrionBrowser Dependencies window opens. Click Download, and when it has finished click Open WebUIStudio; see Installation. Once the dependencies are in place, start Studio in either of these ways:
- From Unreal (recommended): click the WebUIStudio button on the Level Editor's main toolbar. Studio opens the current project and trusts it.
- Directly: double-click
Binaries/in the plugin folder and choose aWin64/ WebUIStudio.exe .uproject. A project opened this way needs one click on "Trust project".
"Local data" in Settings shows how much space Studio's data takes and lets you clean it up.
Trust and environment
Until a project is trusted, Studio only lists its interfaces. After you click "Trust project" on the banner, it runs previews, installs dependencies and sends requests. Do not trust a project of unknown origin.
Studio brings its own Node.js and npm. When an app's packages are missing, click "Install environment" on the banner. Sending annotations and new-app requests needs the Codex or Claude desktop app, installed and signed in; isolated drafts also need their command-line tools and Git. Press Ctrl+K and type "Check the environment…" to check again.
The window
| Area | Content |
|---|---|
| Title bar | Project menu, command search (Ctrl+K), language, appearance, Settings |
| Left rail | Apps in two groups, "Production" and "Plugin samples", with "New app" first; "Scenario", "Assets & tools" and "Settings" at the bottom, with "Discovery report" above them when there is something to report |
| Context bar | Four selectors, "Page", "Scenario", "Resolution" and "Source", and "Reload preview" |
| Stage | The real page at the chosen resolution |
| Tool dock | "Browse" and four annotation tools, plus screenshot, preview backdrop, hand and zoom |
| Right panel | Four tabs: "Annotations", "Inspect", "Draft" and "Log" |
SettingsPanel the tutorials share open, the preview zoomed to 112% and one annotation made with the Element tool. The numbers follow the rows of the table above: ① title bar ② left rail ③ context bar ④ stage ⑤ tool dock ⑥ right panel. Click the picture to enlarge it.Open an interface
- Click an app in the left rail. Your project's apps are under "Production"; the plugin's Showcase and Sample are under "Plugin samples".
- For an app with several pages or views, expand the arrow at the end of its row and click a page or a view.
- Choose "Source" in the context bar:
| Source | Reads | Needs | Characteristics |
|---|---|---|---|
| Source (live updates) | src |
App packages installed | The preview updates when you save; controls can be located in source |
| Build output | dist |
A build | Exactly the files Unreal will load |
After adding or moving an app, click "Rescan project" in the left rail.
The page lays out at the chosen "Resolution". Drag the grip outside the bottom-right corner of the preview to change the aspect ratio, and double-click it to return to 1920 × 1080. For zooming and moving, see Shortcuts; "Capture and copy" in the tool dock puts a screenshot of the preview on the clipboard.
In the preview, business actions are not executed, sounds are not played, and a Native Surface, runtime images and Unreal assets appear as placeholders; when fallback fonts are used, the context bar says "Fallback fonts and assets". Blueprint or C++ logic, real input, sounds, performance and readability over the level must be checked in Unreal.
Preview backdrop
Most of the page is transparent. "Preview backdrop" in the tool dock decides what shows where the page is transparent: the transparency grid (default), white, black, grey, a colour of your choice, or a picture. With a screenshot of your game as the backdrop you can see whether text is readable over it. Screenshots carry the same backdrop.
Views: webui-preview.json
A page often has several appearances: another language, empty data, an open dialog. Put a webui-preview.json in the app root and register them as views, and each can be opened from the left rail.
For example, the settings panel the tutorials share:
{
"schemaVersion": 1,
"views": [
{ "id": "default", "route": "", "title": "Default" },
{ "id": "chinese", "route": "", "title": "Chinese", "patch": { "culture": "zh-Hans" } },
{ "id": "muted", "route": "", "title": "Volume 0", "patch": { "volume": 0 } }
]
}"default" · no patch"chinese" · patch: { "culture": "zh-Hans" }"muted" · patch: { "volume": 0 }patch.A view's data comes from the app's preview state: an export below src whose name contains both preview and state (for example createSettingsPanelPreviewState), either a constant or a function without required parameters; or name it with the state field. Without a preview state the page opens on an empty state, and "Discovery report" states the reason.
| Field | Meaning |
|---|---|
schemaVersion |
Always 1 |
state.module, state.export, state.args |
Optional. The module below src/ that holds the preview state, the export name, and the arguments to call it with |
views[].id |
Identifier of the view: letters, digits, _, -; unique within the app |
views[].route |
The route the view belongs to. An app without routes uses the empty string |
views[].title |
The name shown in the list |
views[].args |
The arguments the preview state is called with for this view |
views[].patch |
An object merged over the preview state, suited to a view that differs in a field or two. Objects merge level by level; arrays and other values are replaced |
views[].events |
Events sent to the page while this view is shown: name, payload, and an optional moment at |
The first view of a route is the default one. The supplied Showcase's webui-preview.json can serve as a reference.
Scenarios
"Scenario" in the context bar defaults to "Live preview from project source", one per view. When you need a special state that the source does not provide, open "Scenario" at the bottom of the left rail, edit the JSON (initial state, answer rules for actions, events on a timeline) and click "Validate and save"; you can then select this custom scenario in the context bar.
Inspect and Log
Inspect tab. Click a control with the Element tool. The right panel shows its control Id, size, source file and line, component chain and matched style rules. "Open in editor" opens the source file with the system's default program.
Log tab. Messages between the page and the host, the page's console output and blocked external requests, newest first, filterable by "All", "Warnings" and "Errors". When the page reports an error or an action is rejected, the Log tab is marked with a red dot.
settings-reset control was clickedResult entries in Log are the stand-in host rejecting the business actions (studio.unhandledCall), which is expected.Annotate and send to an agent
Studio can hand your change requests to Codex or Claude together with the control's location, screenshots and source line. Requirements: the project is trusted, and the desktop app of that service is installed and signed in.
Annotate
Choose an annotation tool in the tool dock:
| Tool | Operation | Recorded |
|---|---|---|
| Element | Click a control; press and drag to mark an area instead | The control and its source location |
| Pin | Click anywhere | A point and the control under it |
| Area | Drag a rectangle | The area and the controls inside it |
| Draw | Press and draw freely | The stroke and the controls within it |
A popover appears next to the target:
- Write "What should change here?", press
Enterto save,Shift+Enterfor a new line,Escto cancel. - While the comment is empty, the Element tool moves to the parent or the first child control with
↑and↓. - For a single control you can open "Adjust properties" and change text, colour, font, spacing, size, border and more. These adjustments apply to the preview only and do not change source. They travel with the annotation as target values for the agent.
Enter to save. The slider icon on the left opens the property adjustments.Saved annotations show a number on the page. In the "Annotations" tab of the right panel you can edit them, "Re-anchor" them and delete them. One batch holds at most 30. After the page or the source changes, an annotation is marked "Needs re-anchoring"; use "Re-anchor" to choose the new target.
While an annotation tool is active, clicks do not reach the page. Switch back to "Browse" to operate the page.
Send
- Write the overall request for this batch at the bottom of the right panel.
- Click "Send to" and choose Codex or Claude and the kind. The first three change the current project directly:
| Kind | Note |
|---|---|
| Continue Studio chat | Continues the chat Studio started last; a new one is created if there is none |
| New Studio chat | Opens a new chat for this project in the desktop app |
| Existing conversation | Pick a conversation that belongs to this project from the list |
| Isolated draft | Changes are made in a copy and applied after your review; see Isolated drafts |
- Adjust if needed: model and reasoning effort, the scope of changes, or "Plan mode" (writes a plan only, changes no files).
- Click "Send annotations".
Without annotations the button becomes "Send page request", which asks the agent to change the whole page on stage.
The delivery records in the right panel show the state of each one; when the receiver has changed the source, the preview shows the result. "Stop tracking" only ends Studio's wait; it does not stop a task the desktop app has already started.
When you send to Claude, Studio registers a few hooks whose statusMessage is Orion WebUI Studio bridge in the project's .claude/ to receive the reply. This file is normally shared through version control, so look at this change before you commit it.
New app
"New app" in the first row of the left rail opens a sheet:
- Write the "Description": what to build, what it shows, what can be done in it. See Tutorial 1 for how to write it.
- "App name" is optional: it starts with a capital letter, contains only letters and digits, and must not match an existing app. Left empty, the receiver names the app.
- Choose Codex or Claude, and a new chat or the Studio chat.
- Click "Send to …". Or click "Copy prompt" and paste it into any conversation.
When the receiver has finished, the new app appears in the left rail; the receiver lists the steps that remain to be done in the Editor.
Isolated drafts
To see a change before deciding on it, use an isolated draft:
- Add annotations, choose "Isolated draft" of Codex or Claude under "Send to", and click "Generate isolated draft".
- Studio lets the command-line tool change a copy of the app, then runs the app's own type check, tests and build.
- Review the differences in the "Draft" tab. You can preview the draft side by side with the original project.
- When satisfied, click "Apply to project" (you can "Undo this apply" afterwards), then "Rebuild this app's dist" if needed.
All annotations must belong to the same app and come from the "Source" source. A draft may change only the source files the annotations located, plus shared components and entry or bridge files when you allowed them; only apps below the project's Content/UI/WebUI can take a draft.
Shortcuts
| Keys | Effect |
|---|---|
Ctrl+K |
Command search: tools, apps, pages, views, language, appearance |
Ctrl+. |
Toggle the annotation tool used last |
Ctrl + wheel, Ctrl+=, Ctrl+- |
Zoom the preview |
Ctrl+0 |
Fit the preview to the window |
| Middle-button drag | Move a zoomed preview |
Ctrl+Enter |
Send from the overall request or the app description |
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| My app is not in the left rail | Its folder is not below a folder named WebUI, or it has none of these: a package.json containing orionWebUI, an index.html, a dist/index.html. Correct that and click "Rescan project" |
| "Source" cannot be selected | Packages are not installed; use "Install environment" or run npm ci in the app folder |
| "Build output" cannot be selected | There is no dist/index.html; run npm run build |
| It opens on an empty state | No preview state; read "Discovery report" and add one as described under Views |
| Data in a browser, none in Studio | The preview data exists only in the no-host branch; export it as a preview state |
| "Build output" has no data | Open the page once with the "Source" source first, and again after the source changes |
studio.unhandledCall appears in the log after clicking a button |
Normal: business actions are not executed in Studio. The page should catch the rejection |
| Sending is not possible | The project is not trusted, or the desktop app is not installed or not signed in. For an existing conversation, the receiver must be idle with an empty input field |