Distribution and versioning
You share a plugin as a single folder. The recipient puts that folder in a plugin folder and enables it in the Plugin Manager.
Files to include
Section titled “Files to include”| File | Include? | Description |
|---|---|---|
plugin.json | Yes | Directly in the folder |
| Your dll | Yes | The dll path in plugin.json |
| Other dlls you use (NuGet packages and so on) | Yes | Next to your dll. Also include the .deps.json from the build output. |
.pdb | Optional | Error locations (line numbers) appear in the log. |
NP.Editor.Sdk.dll | No | The editor’s copy is used. Exclude it in the csproj with Private=false. |
| Large data | Optional | Keep it in the folder and locate it with host.PluginDir. |
road_tools\├─ plugin.json├─ RoadTools.dll├─ RoadTools.deps.json├─ RoadTools.pdb└─ data\ └─ presets.jsonPick the files above from the dotnet build -c Release output folder and zip them. Tell recipients the following:
- Unzip and put the
road_toolsfolder in the plugin folder (Tools › Open plugin folder). - In Tools › Plugin Manager…, click Rescan.
- The first time, click Trusted — load in the security warning.
The editor also loads plugins placed in the plugins\ folder under the editor install folder.
Your version number (version)
Section titled “Your version number (version)”Increment version in plugin.json following semver (major.minor.patch). It appears in the Plugin Manager Version column.
| What changed | Part to increment | Example |
|---|---|---|
| Bug fixes only | patch | 1.2.0 → 1.2.1 |
| Added features (save format and commands unchanged) | minor | 1.2.1 → 1.3.0 |
| Changed command names · world logic types · settings keys · save format | major | 1.3.0 → 2.0.0 |
- World logic
Typeand fieldNamevalues are saved in map files (scene.json). If you change them, rules in old maps become Unknown type. - Do not change the
id. Settings files and user-rebound shortcuts are saved byid.
sdk range
Section titled “sdk range”Set sdk to the minimum version of the features you actually use.
| What you use | sdk | Editors it runs on |
|---|---|---|
| SDK 1.0 features only | ^1.0 | All of SDK 1.0 – 1.x |
Settings · Draw · AddShortcut | ^1.1 | SDK 1.1 – 1.x |
AddSceneEvent | ^1.2 | SDK 1.2 – 1.x (editor 0.9.0 or later) |
Scene · View · ActorList | ^1.3 | SDK 1.3 – 1.x (editor 0.9.1 or later) |
- If you set it too high, users of older editors cannot use the plugin.
- If you set it too low, loading on an older editor fails because of missing members (Version mismatch).
- Do not use ranges without an upper bound (
>=1.0). The plugin could load in a broken state on the next major.
SDK compatibility promise
Section titled “SDK compatibility promise”| Promise | Details |
|---|---|
| Within the same major | Types and members are only added. They are never renamed or removed. |
| New fields | Added as trailing fields with default values. Old code compiles unchanged. |
| Breaking changes | The major is incremented (2.0). ^1.x plugins stop safely with Version mismatch and the editor keeps running. |
| Behavior | The meaning of registration points does not change within the same major. |
Per-version changes are in the SDK changelog.
Security
Section titled “Security”A plugin is code that runs on this computer with the same permissions as the editor, without signature checks.
| Prevented | Not prevented |
|---|---|
| Exceptions in plugin code → only that plugin is disabled (isolation) | Infinite loops · stack overflows · process exit |
| Cleanup of registrations, drawings and the camera for disabled plugins | Reading · writing · deleting files |
| Network access |
- The editor shows a warning once when it first finds a plugin.
- Install only plugins you built yourself or got from a source you trust.
- When you share a plugin, also share the source or where it came from.
- Do not put secret keys or tokens in a plugin. A dll is easy to decompile.
Pre-release checklist
Section titled “Pre-release checklist”- Incremented
versioninplugin.json. -
sdkis the minimum version of the features used. - The folder does not contain
NP.Editor.Sdk.dll. - It enables with Rescan when placed in a fresh user folder.
- Menus and panels are not duplicated or left behind after enable → disable → enable.
The detailed list is under “Pre-release checklist” in Troubleshooting.