Plugin
Extend NarraLeaf Studio and the games it builds with installable plugins.
A plugin is a folder with a manifest.json and one or two prebundled entry files. It can add editor panels, actions, keybindings, blueprint nodes, widgets, and language packs to Studio, and ship game-side code that runs inside the games you build.
Plugins have two entry targets, and a plugin declares one or both:
| Target | Runs in | API | Use it for |
|---|---|---|---|
studio | The editor (workspace window) | narraleaf-studio/plugin | Panels, actions, keybindings, blueprint node editor metadata, widgets, language packs |
runtime | The game (Dev Mode, Preview, Production) | narraleaf-studio/runtime | Blueprint node execution, widget rendering, game-side logic |
A blueprint node needs both targets to work in a shipped game: the studio entry registers its editor metadata and the runtime entry registers the code that runs when the game plays it. You write the definition once in a shared module and register it from each entry — see Make a plugin.
Make a plugin
From an empty folder to an installed plugin: manifest, entries, a blueprint node, a panel, localization, and packaging.
Manifest
Every field, the full contributes surface, and why most permissions are derived rather than written.
API reference
Every method on the studio and runtime surfaces, with examples and the sharp edges.
Studio API
Everything a plugin touches in the editor: services, the ui kit, and privileged capabilities.
Runtime API
The capability-gated game surface: what each declared capability buys you on app.game.
Build dependencies
External binaries Studio downloads, verifies, and caches at build time.
Install a plugin
Install from the store or a folder, approve permissions, and keep plugins updated.
Project dependencies
What a project records about the plugins it uses, and which ones ship inside a built game.
Capabilities are declared, not discovered
Anything a plugin's game-side code can reach beyond registering nodes and widgets — storage, story variables, saves, an overlay, a native child process — must be declared in contributes. Studio derives the install permission prompt from that declaration, and an undeclared capability is absent from the API object rather than a call that fails. Read the capability model before writing a runtime entry; it is the one thing that shapes everything else.
The API is types-only
narraleaf-studio is a types-only package. It ships declarations for narraleaf-studio/plugin and narraleaf-studio/runtime; the implementation comes from Studio at load time. Add it as a dev dependency and mark both specifiers external in your bundler (the template does this for you).
yarn add -D narraleaf-studioPlugins are not sandboxed. An installed plugin runs with the same access as Studio itself, and its game-side code runs on players' machines. Install plugins you trust. Studio shows a permission prompt on install for anything a plugin declares beyond the default surface.