KROYSDOCS
HomeWhat's newv0.1.0
MANUAL / Extend the editor / Manifest and permissions

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.

File<Name>.kplugin
PanelPlugin Manager
Locationsengine, user, project
01

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"
02

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.

CapabilityAllows
commands, panels, settingscommands and menus, panels, settings pages
importers, exporters, asset-typesfile formats and custom assets
viewport-toolstools that take clicks in the viewport and draw over it
services, tasks, automationbackground services, worker tasks, automation steps
components, systemsruntime component types and game systems (native)
PermissionAllows
scene.read, scene.writereading and editing the open scene (undoable)
assets.writecreating and importing files in the project
network.loopbacksockets on this machine only
project.buildbuilding the project's scripts and packaging the game (editor operations)
03

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.

04

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.

05

Share a plugin

Give the manifest a real version, author, description and license, zip the plugin folder without bin/, obj/ and .kroys/, and others install it with Install from Zip. Optional hash lines let the editor verify files before it loads them. When a game is packaged, each enabled plugin's runtime part ships with it; editor parts never do.

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.