Manifest and permissions
Every plugin is a folder with a manifest that says what it is, what it needs and what it may use. The Plugin Manager enables plugins per project, installs and removes them.
The manifest
module names the code: editor, runtime or both, a native DLL or, for C# editor plugins, managed with a project (built by the editor, hot-reloaded) or a prebuilt DLL (no build, no reload). Version ranges accept 1.2.3, >=, <, ^1.2, ~1.2.3, 1.x, *; a space means and, || means or.
LevelTools.kplugin
kroysplugin 2 id "LevelTools" # letters, digits, '.', '_', '-' name "Level Tools" version "0.1.0" # semantic version sdk "2.1.0" # SDK the plugin was built with engine ">=2.1 <3" # engine SDK versions it supports module editor managed "LevelTools.csproj" dependency "OtherPlugin" "^1.2" load_phase default # early | default | late capability commands panels settings services tasks automation permission scene.read scene.write description "What it does." author "Who wrote it" license "MIT"
Capabilities and permissions
Capabilities are the extension points a plugin uses; permissions guard sensitive access. A call outside them fails with a message that names the manifest line to add.
| Capability | Allows |
|---|---|
commands, panels, settings | commands and menus, panels, settings pages |
importers, exporters, asset-types | file formats and custom assets |
viewport-tools | tools that take clicks in the viewport and draw over it |
services, tasks, automation | background services, worker tasks, automation steps |
components, systems | runtime component types and game systems (native) |
| Permission | Allows |
|---|---|
scene.read, scene.write | reading and editing the open scene (undoable) |
assets.write | creating and importing files in the project |
network.loopback | sockets on this machine only |
project.build | building the project's scripts and packaging the game (editor operations) |
Where plugins live
Plugins are found in <engine>/Plugins, in the user plugin folder and in <project>/Plugins, in that order; a later copy of the same id wins. The project file records which plugins are enabled. A plugin that cannot load (bad manifest, engine version out of range, missing dependency, a dependency cycle) is skipped and the Plugin Manager says why.
The Plugin Manager
Tools › Plugins › Plugin Manager... lists every plugin with its version, parts, location and status. The toggle enables it for the project; Install from Folder and Install from Zip add plugins to the project or your user folder; Uninstall moves one to the project's recycle folder. The details show the manifest, what the plugin registered and, under Diagnostics, every resolution and load step. The book button opens the plugin API reference.
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.