Skip to content

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.

FileInclude?Description
plugin.jsonYesDirectly in the folder
Your dllYesThe dll path in plugin.json
Other dlls you use (NuGet packages and so on)YesNext to your dll. Also include the .deps.json from the build output.
.pdbOptionalError locations (line numbers) appear in the log.
NP.Editor.Sdk.dllNoThe editor’s copy is used. Exclude it in the csproj with Private=false.
Large dataOptionalKeep it in the folder and locate it with host.PluginDir.
road_tools\
├─ plugin.json
├─ RoadTools.dll
├─ RoadTools.deps.json
├─ RoadTools.pdb
└─ data\
└─ presets.json

Pick the files above from the dotnet build -c Release output folder and zip them. Tell recipients the following:

  1. Unzip and put the road_tools folder in the plugin folder (Tools › Open plugin folder).
  2. In Tools › Plugin Manager…, click Rescan.
  3. 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.

Increment version in plugin.json following semver (major.minor.patch). It appears in the Plugin Manager Version column.

What changedPart to incrementExample
Bug fixes onlypatch1.2.0 → 1.2.1
Added features (save format and commands unchanged)minor1.2.1 → 1.3.0
Changed command names · world logic types · settings keys · save formatmajor1.3.0 → 2.0.0
  • World logic Type and field Name values 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 by id.

Set sdk to the minimum version of the features you actually use.

What you usesdkEditors it runs on
SDK 1.0 features only^1.0All of SDK 1.0 – 1.x
Settings · Draw · AddShortcut^1.1SDK 1.1 – 1.x
AddSceneEvent^1.2SDK 1.2 – 1.x (editor 0.9.0 or later)
Scene · View · ActorList^1.3SDK 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.
PromiseDetails
Within the same majorTypes and members are only added. They are never renamed or removed.
New fieldsAdded as trailing fields with default values. Old code compiles unchanged.
Breaking changesThe major is incremented (2.0). ^1.x plugins stop safely with Version mismatch and the editor keeps running.
BehaviorThe meaning of registration points does not change within the same major.

Per-version changes are in the SDK changelog.

A plugin is code that runs on this computer with the same permissions as the editor, without signature checks.

PreventedNot 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 pluginsReading · 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.
  • Incremented version in plugin.json.
  • sdk is 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.