Skip to content
NP Editor Docs

Plugin development (SDK) overview

You can extend NP Editor with external C# plugins. A plugin is one folder that contains a dll and a plugin.json, and it references only one SDK assembly, NP.Editor.Sdk.dll. You do not need to know Godot or the editor’s internal code.

The SDK version of the 0.11.1 editor is 1.5.0. It appears in the top line of the Tools > Plugin Manager… window in the form SDK 1.5.0 · … external plugins. 0.10.2, 0.10.3, 0.11.0, and 0.11.1 did not change the SDK surface, so plugins built against SDK 1.0 to 1.5 do not need a rebuild. However, the 0.11.0 installer loads only plugins signed by Noplatea, so you need to get a signature (Distribution and versioning).

  1. Follow Quick start to create a net8.0 class library that references NP.Editor.Sdk.dll from the install folder.
  2. In Register(host) of the class that implements INpEditorPlugin, attach features with host.Add….
  3. Copy the built dll and plugin.json to %APPDATA%\NPEditor\plugins\<folder>\.
  4. Click Tools > Plugin Manager…, then check Enable on the row of the new plugin.
  • Press F1 in the Plugin Manager window to open this page.
  • Type plugins in the console to see the plugin list, versions, states and errors at once.
  • Move block placement math into a function that takes an INpWorld, and you can test it with unit tests without the editor (Testing and debugging).
  • The editor does not lock plugin dlls. Rebuild while the editor is running and apply the change right away with Reload (selected).
Where it attachesIn the editorRegistration pointSDK
Menu itemsMenu bar (File · Edit · Window · Tools · Build · Help; any other name = a new menu)AddMenuItem1.0
Quick addMain toolbar Add list (category · search · icon)AddQuickAddItem1.0
Console commandsConsole panelAddCommand1.0
Import · exportImport: <name> in the File menu · Export: <name> in the Build menuAddImporter · AddExporter1.0
PanelsPanels in the bottom area (open from the Window menu)AddContentTab + NpUi1.0
ModesMode row on the main toolbar · Tool panel · viewport clicksAddMode1.0
Actor typesText and color in the Type column of the OutlinerAddActorType1.0
Cell guards · symmetryEvery block editAddCellGuard · AddSymmetry1.0
Screen verification scenarios--np-shot=<id> (runs only in editor development builds)AddShotScenario1.0
ShortcutsUsers can rebind them in Tools > Shortcuts…AddShortcut1.1
Settings storageOne JSON file per pluginhost.Settings1.1
3D overlay drawingLines, boxes and text over the viewporthost.Draw1.1
World logic typesWorld logic · Logic graph · checks · AI Studio · Play previewAddSceneEvent1.2
Scene actor reading · play cameraScene actor list, camera during Playhost.Scene · host.View1.3
Account tier checkRead the tier and feature codeshost.Account1.4
“Display” menu items · status bar itemsCheck items in the Display menu of the viewport bar, items in the status bar at the bottom of the screenAddShowFlag · AddStatusItem1.5
Confirm before replacing the mapBefore New, Open or loading an autosaveAddWorldReplaceGuard1.5

Plugins read and write the world through host.World. Block state strings use the Minecraft format (minecraft:oak_stairs[facing=east]), and one World.Edit call is one undo step.

External plugin (the subject of these pages)Built-in feature
LocationOne folder inside the plugin folderInside the editor
ReferencesNP.Editor.Sdk.dll onlyEditor internal code
Enable · disableIn the Plugin Manager, without closing the editorAlways on
ExceptionsOnly that plugin is disabled (isolated); the editor keeps runningFixed together with the editor
CompatibilityPromised by the SDK version (semver)Same as the editor version

Core features such as Block brush, Landscape and World logic are also built-in features attached through the same registration structure. Built-in features also use registration points that are not public (view modes, viewport dragging, panel area selection and so on). The pages in this section cover external plugins only.

MyPlugin.dll ──references──> NP.Editor.Sdk.dll (interfaces · data types only)
│
Plugin host (plugin.json check · SDK version comparison · load context · error isolation)
│
NP Editor (menus · modes · panels · world logic · viewport)
LayerWhat it does
Your plugin dllCalls registration points in INpEditorPlugin.Register(host).
NP.Editor.Sdk.dllContains only interfaces and data types. Plugins share the same assembly that the editor has already loaded.
Plugin hostChecks plugin.json and compares SDK versions. Creates a separate load context for each plugin, catches exceptions from plugin code and disables only that plugin.
EditorAttaches what was registered to menus, toolbars, panels and world logic, and detaches all of it when the plugin is disabled.

Inside the editor, the ids of registered items such as menus, modes and panels get an ext.<plugin id>. prefix, so they never collide with the ids of built-in features or other plugins. Console command names, world logic types and actor kinds get no prefix. See Loading and lifecycle for the full rules.

ItemValue
EditorNP Editor 0.11.1 (SDK 1.5.0). If the features you use need a lower SDK version, older editors also work (SDK 1.4 = 0.9.12, 1.3 = 0.9.1, 1.2 = 0.9.0).
.NET SDKA .NET SDK (8 or later) that can build net8.0. The .NET runtime inside the editor is 8, so the target is net8.0.
LanguageC# 12
Code editorAny C# editor, such as Visual Studio, Rider or VS Code
SDK dll<install folder>\data_NPEditor_windows_x86_64\NP.Editor.Sdk.dll (NP.Editor.Sdk.xml for IntelliSense is in the same folder)

The default editor install folder is %LOCALAPPDATA%\Programs\NP Editor.

Security: a plugin is code that runs with the same permissions as the editor. The 0.11.0 installer loads only plugins signed by Noplatea (plugin.sig.json in the folder). A plugin with no signature, or whose files changed after signing, becomes “Signature problem”, its Enable checkbox cannot be checked, and no setting, environment variable, or command line can turn this check off. Even for a signed plugin, the editor does not load a new folder until the user checks Enable for it in the Plugin Manager. For how to get a signature, see Distribution and versioning.

What you want to doPage
Build your first pluginQuick start
Learn the plugin.json fieldsplugin.json
How enabling, disabling and isolation workLoading and lifecycle
Read and write the world, events, settings, 3D drawingHost API
All registration points: menus, modes, commands and moreRegistration points
Build panel UIPanel UI (NpUi)
Add triggers, conditions and actions to world logicAdding world logic types
Camera work during PlayScene access and play camera
Testing and debuggingTesting and debugging
Share with othersDistribution and versioning
When something goes wrongTroubleshooting
What changed in each SDK versionSDK changelog
Sample sourceSample: hello_tool · Sample: csv_export · Sample: event_example