Skip to content

Studio

Studio is Jiangyu's interactive workspace. Find assets, edit replacements and templates, compile your mod, all in one window. The CLI mirrors most of what Studio does. See CLI for the scripting surface.

Opening a project

When Studio starts without a project loaded, it shows a welcome screen with three options:

  • Open project: pick a directory containing a jiangyu.json.
  • Recent projects: up to five recently opened projects, click to reopen.
  • New project: scaffold a fresh project. Studio asks for a directory and a project name, then writes the same starter files as jiangyu init. See Manifest for the scaffolded shape.

A loaded project shows in the topbar with its directory name and current git branch.

The pane workspace

The main editing area is a grid of panes. Each pane has tabs, and each tab is one of a few kinds:

  • Code: a text editor for any project file. Used for jiangyu.json, templates/*.kdl, and any other file you want to edit by hand.
  • Asset Browser: search and preview game assets. See below.
  • Template Browser: search MENACE templates and scaffold patches or clones. See below.
  • UI Inspector: browse the running game's live UI tree to find injection selectors. See below.

The workspace is built around drag-and-drop. Most layout work is done by grabbing things and moving them, not by clicking menu items.

Resizing panes

Every divider between panes is a resize handle. Drag the divider left/right or up/down to repartition space. Resizes persist with the project. They're restored next time you open it.

Moving tabs

Drag a tab by its title:

  • Drop it elsewhere in the same tab strip to reorder within the pane.
  • Drop it onto another pane's tab strip to move the tab there.
  • Drop it onto another pane's body to enter the drop overlay (see below).

To break a pane out into its own window, click the Move pane to new window button in the tab strip. The pane moves out of the main window and the secondary window takes over its tabs. Drag tabs or panes from a secondary window's tab strip back into the main workspace to dock them in. The same drop zones apply. Studio remembers your open secondary windows per project and re-spawns them next time you load the project.

Splitting and rearranging panes

While dragging, an overlay covers the hovered pane and divides it into five drop zones: Left, Right, Top, Bottom, and Centre. The overlay highlights which zone the cursor is in.

What happens on drop depends on what you grabbed:

  • A single tab (dragged from its title):
    • Edge → splits the target pane in that direction, and the tab opens in the new sub-pane.
    • Centre → the tab joins the target pane's tab strip. Code panes only.
  • A whole pane (dragged from empty space in the tab strip):
    • Edge → moves the dragged pane to that side of the target.
    • Centre → swaps positions with the target pane.

The maximise button in a pane's tab strip fills the window with that pane. Press Escape to exit.

The sidebar on the left is a project file tree. Click a file to open it in a code pane, or drag it into a specific pane to control where it lands. Hide the sidebar with Ctrl+B.

The status bar along the bottom shows the current compile state and a button to open the compile dossier.

Saving

Code edits don't auto-save. Press Ctrl+S to write the active tab to disk. A dirty tab shows a dot next to its title until saved.

Command palette

Press Ctrl+Shift+P (or Ctrl+K) to open the palette: a fuzzy-searchable list of every action Studio currently registers. Most navigation happens through here.

Key uses:

  • Open a browser ("Open Asset Browser", "Open Template Browser") to start searching the asset or template index. Browsers open in a new pane.
  • Compile the project, then Deploy Mod to copy the build into the game's Mods/ folder.
  • Sync Code Project to scaffold or refresh code/, and Sync Unity Project / Open Unity Editor for prefab authoring.
  • Switch project or open a recent project.
  • Layout actions: split right or down, focus the next or previous pane, move a pane to a new window, toggle the sidebar.
  • Go to file: fuzzy navigation across the project tree.

Actions are grouped by scope (App, Project, Code, Unity, View, File, Editor, AI, Go to file). Some show a keyboard shortcut on the right. Running the palette entry is equivalent to pressing the shortcut.

Asset Browser

The Asset Browser searches the asset index built by jiangyu assets index (or by Studio's own index button when the index is missing or stale).

  • Search box: live name search across the index. Typing filters results as you type.
  • Kind filter pills: All, Model, Mesh, Texture, Sprite, Audio. Click one to narrow results.
  • Results list: each row shows the asset name, class, collection, and pathId.
  • Detail panel: when you select a result, a side panel shows class, collection, pathId, and asset-specific metadata (frequency and channels for audio, atlas and rect for sprites). The Replace row gives the path under assets/replacements/ to drop your replacement at. The Affects row shows the count when the name is shared.
  • Preview pane: textures and sprites render inline, audio shows an inline player, and models render in a 3D viewer with orbit controls.
  • Export: pulls the vanilla asset out as a starting point. The dropdown picks the destination: Export to default (<project>/exported/), Export to project defined (the per-project path, set from the dropdown's Configure project path…), or Export to custom… to pick a directory. Multi-select to export several at once. Successful exports push a toast with a Reveal action that opens the file location.

Template Browser

The Template Browser searches the template index built by jiangyu templates index.

  • Search box: substring match across template type names, ids, and collections.
  • Type filter: narrow to one template subtype (UnitLeaderTemplate, WeaponTemplate, etc.).
  • Results list: each row is one template id within its subtype.
  • Detail panel: selecting a row shows the template in the right-hand detail panel: its type, collection, pathId, the fields on the type with their current vanilla values, and any other templates that reference it. Clicking a reference navigates to that template. and walk your navigation history.
  • Scaffold dropdown: the Scaffold button in the detail panel emits a starter KDL snippet for the focused template. Create Patch and Create Clone append to the template file you're currently editing if it's under templates/ and ends in .kdl, otherwise they open a picker so you can choose an existing templates/*.kdl file or create a new one. Add patch to file… and Add clone to file… always go through the picker. The resulting .kdl file opens in a code pane, where you fill it in via the Template Visual Editor or as raw KDL.

Studio caches the template index alongside the asset index. Re-run Index templates when MENACE updates.

Template Visual Editor

When you open a templates/*.kdl file in a code pane, the editor bar shows a Visual / Source toggle. The Visual mode edits the same patches and clones with structured controls instead of free-form text. The default mode is set under Settings → Template editor, and the toggle remembers per-file overrides.

  • Visual: every field on the template appears as a row. Edits add set operations (or append/insert/remove for collection fields) to the underlying patch. The current vanilla value is shown next to your edit so you always know what you're overriding.
  • Source: the raw KDL text for the same file. Edits in either mode round-trip through the parser, so you can pop into Source for a fiddly edit and back to Visual without losing structure.

The fastest way to author is by dragging from the Template Browser into the editor:

  • Drag an instance row (a specific template id) into the editor body to add a new patch or clone targeting that template. A grip glyph reveals on hover to signal draggability.
  • Drag a member row (a field on the template's type) into a patch's body to add a set operation for that field. The editor pre-fills the field path, the right value control for the field's type, and the current vanilla value as a placeholder.

See Templates for the KDL grammar.

UI Inspector

The UI Inspector captures the running game's live UI tree, so you can find the selectors to target with the Game UI injection API. Open it from the palette (Open UI Inspector), and it opens in a new pane.

It reads the game over the live game bridge, a localhost connection the dev loader provides, enabled in Settings and off by default. With the bridge on and the game running, the status chip in the toolbar reads Live. Until then it reads Waiting for game or Bridge off, and the empty state says which.

  • Capture: pulls the current screen's UI tree. Navigate to the screen you want in the game first, then capture.
  • Tree: each node shows its type, #name, .class list, and any text. Expand and collapse with the chevrons, or search by type, name, or class to filter the tree to matching nodes and their ancestors.
  • Copy a selector: the copy button on a node copies its best UiSelector snippet. Right-click a node for the full menu of UiSelector.Name, UiSelector.TypeName, and UiSelector.Class snippets to paste into your mod.

The inspector is read-only. It never changes the running game.

Compile

Compile runs the same pipeline as jiangyu compile, with a UI that shows you what's going to happen before it does.

  • Ctrl+Shift+B kicks off a compile immediately. Use this when you trust the project state and just want to ship.
  • Palette → Compile (or the compile button in the status bar) opens the compile dossier: a two-column modal with a stat panel on the right showing the asset and template counts that will be emitted, and a terminal-style log column on the left that streams output once the build starts. Click the Compile button inside the dossier to begin.

A successful compile pushes a toast with the elapsed time, warning count, and a Reveal action that opens your project's compiled/ folder in your file manager.

Settings

The Settings dialog (palette → Settings) configures both global and per-project state.

  • Game path: directory containing MENACE.exe. Required for indexing and compilation. Studio detects the game's Unity version and shows it next to the field.
  • Unity Editor path: a Unity Editor binary. The compile step uses it to build AssetBundles. Studio shows the expected version next to the field and warns if your install doesn't match.
  • Loader: deploys the in-game loader into the game's Mods/, so you never copy the DLL by hand. See Deploying the loader.
  • Live game bridge: opens a localhost connection between Studio and the running game, used by the UI Inspector. Available only with the dev loader deployed. Off by default. The indicator beside the toggle shows the connection state: live, waiting for the game, or off.
  • Template editor: default mode for .kdl template files in the editor pane (Visual or Source). Per-file toggles in the editor bar override this.
  • Restore open tabs: when on, Studio reopens the panes and tabs from your last session.

The same global config is what jiangyu CLI reads. Edits in Studio and the CLI share one file.

Deploying the loader

Studio provides a specific loader for dev use and can deploy it for you, so you never copy Jiangyu.Loader.dll into Mods/ by hand. The Loader row shows what is currently deployed, read back from the DLL in Mods/ rather than a remembered setting, and offers two builds:

  • user: the lean loader. This is the build shipped to users.
  • dev: the same loader with the Studio bridge and diagnostic probes merged in. Deploy this while you iterate, because it is what the live game bridge connects to for the UI Inspector and Studio's live game tools.