Overview
Plugin development (SDK) overview
Section titled “Plugin development (SDK) 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.
What a plugin can add
Section titled “What a plugin can add”| Where it attaches | In the editor | Registration point | SDK |
|---|---|---|---|
| Menu items | Menu bar (File · Edit · Window · Tools · Build · Help; a new name = a new menu) | AddMenuItem | 1.0 |
| Quick add | Main toolbar Add (search · category · icon) | AddQuickAddItem | 1.0 |
| Console commands | Console panel at the bottom | AddCommand | 1.0 |
| Import · export | File › Import: … · Build › Export: … | AddImporter · AddExporter | 1.0 |
| Panels | Panels in the bottom area (open from the Window menu) | AddContentTab + NpUi | 1.0 |
| Modes | Mode row on the main toolbar + Tools panel + viewport clicks | AddMode | 1.0 |
| Actor types | Text and color in the Outliner Type column | AddActorType | 1.0 |
| Cell guards · symmetry | Hooks into every block edit | AddCellGuard · AddSymmetry | 1.0 |
| Screen verification scenarios | --np-shot=<id> automatic screenshots and checks (editor development builds) | AddShotScenario | 1.0 |
| Shortcuts | Tools › Shortcuts… (users can rebind) | AddShortcut | 1.1 |
| Settings storage | One JSON file per plugin | host.Settings | 1.1 |
| 3D overlay drawing | Lines, boxes and text over the viewport | host.Draw | 1.1 |
| World logic types | World logic · Logic graph · checks · MCP · Play preview | AddSceneEvent | 1.2 |
| Scene actor reading · play camera | Scene actor list, camera during Play | host.Scene · host.View | 1.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 plugins and built-in plugins
Section titled “External plugins and built-in plugins”| External plugin (the subject of these pages) | Built-in plugin | |
|---|---|---|
| Location | One folder inside a plugin folder | Inside the editor |
| References | NP.Editor.Sdk.dll only | Editor internal code |
| Enable · disable | In the Plugin Manager, without restarting the editor | Always on |
| Errors | Only that plugin is isolated; the editor keeps running | Fixed together with the editor |
| Compatibility | Guaranteed 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.
Architecture
Section titled “Architecture”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)| Layer | What it does |
|---|---|
| Your plugin dll | Calls registration points in INpEditorPlugin.Register(host). |
NP.Editor.Sdk.dll | Contains only interfaces and data types. The editor has already loaded this same file and shares it with plugins. |
| Plugin host | Checks plugin.json and compares SDK versions. Creates a separate load context for each plugin, catches exceptions from plugin code and disables only that plugin. |
| Editor | Attaches 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.
Prerequisites
Section titled “Prerequisites”| Item | Value |
|---|---|
| Editor | NP 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) |
| Language | C# 12 (target net8.0) |
| Code editor | Any C# editor (Visual Studio · Rider · VS Code) |
| SDK dll | data_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.
Where to go next
Section titled “Where to go next”| What you want to do | Page |
|---|---|
| Build your first plugin in 10 minutes | Quick start |
Learn the plugin.json fields | plugin.json |
| How enabling, disabling and error isolation work | Loading and lifecycle |
| Read and write the world, events, settings, 3D drawing | Host API |
| All registration points: menus, modes, commands and more | Registration points |
| Build panel UI | Panel UI (NpUi) |
| Add triggers, conditions and actions to world logic | Adding world logic types |
| Camera direction during Play | Scene access and play camera |
| Testing and debugging | Testing and debugging |
| Share with others | Distribution and versioning |
| When something goes wrong | Troubleshooting |
| What changed in each SDK version | SDK changelog |
| Sample source | Sample: hello_tool · Sample: csv_export · Sample: event_example |