Skip to content

Overview

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

This page covers SDK 1.3.0. The SDK version of your editor appears at the top of the Tools › Plugin Manager… window, for example SDK 1.3.0.

Where it attachesIn the editorRegistration pointSDK
Menu itemsMenu bar (File · Edit · Window · Tools · Build · Help; a new name = a new menu)AddMenuItem1.0
Quick addMain toolbar Add (search · category · icon)AddQuickAddItem1.0
Console commandsConsole panel at the bottomAddCommand1.0
Import · exportFile › Import: … · Build › Export: …AddImporter · AddExporter1.0
PanelsPanels in the bottom area (open from the Window menu)AddContentTab + NpUi1.0
ModesMode row on the main toolbar + Tools panel + viewport clicksAddMode1.0
Actor typesText and color in the Outliner Type columnAddActorType1.0
Cell guards · symmetryHooks into every block editAddCellGuard · AddSymmetry1.0
Screen verification scenarios--np-shot=<id> automatic screenshots and checks (editor development builds)AddShotScenario1.0
ShortcutsTools › Shortcuts… (users can rebind)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 · MCP · Play previewAddSceneEvent1.2
Scene actor reading · play cameraScene actor list, camera during Playhost.Scene · host.View1.3

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

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

The editor’s core features (Block brush, Landscape, World logic and so on) are also built-in plugins that use the same registration structure. Built-in plugins also use registration points that are not public (view modes, viewport dragging, panel area selection and so on). These pages cover external plugins only.

MyPlugin.dll ──references──> NP.Editor.Sdk.dll (interfaces · data types)
│
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. The editor has already loaded this same file and shares it with plugins.
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. Detaches all of it when the plugin is disabled.

Everything you register gets an ext.<plugin id>. prefix inside the editor, so its names never collide with built-in features or other plugins. Console command names and world logic types are the exceptions. See Loading and lifecycle for details.

ItemValue
EditorNP Editor 0.9.1 or later (SDK 1.3). If you use only up to SDK 1.2, 0.9.0 also works.
.NET.NET 8 SDK (dotnet --version reports 8. or later)
LanguageC# 12 (target net8.0)
Code editorAny C# editor (Visual Studio · Rider · VS Code)
SDK dlldata_NPEditor_windows_x86_64\NP.Editor.Sdk.dll in the editor install 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, without signature checks. Install only plugins you built yourself or got from a source you trust. See Distribution and versioning for details.

What you want to doPage
Build your first plugin in 10 minutesQuick start
Learn the plugin.json fieldsplugin.json
How enabling, disabling and error 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 direction 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